# [NTG-context] context (lmtx) segfaults on x86_64 linux

Hans Hagen j.hagen at xs4all.nl
Wed Sep 11 09:03:34 CEST 2019

```On 9/11/2019 1:19 AM, Henri Menke wrote:
> On 9/11/19 3:50 AM, Aditya Mahajan wrote:
>> On Tue, 10 Sep 2019, Hans Hagen wrote:
>>
>>> On 9/10/2019 4:11 PM, Vladimir Lomov wrote:
>>>> Hello,
>>>> today I updated lmtx and on simple
>>>>
>>>>     \$ context --version
>>>>
>>>> I get segfault (in the same time luametatex --version works fine).
>>>> Running under gdb shows me that the problem might be in one of 'realloc'
>>>> calls.
>>>>
>>>> The context from Context Suite (mkiv) works fine.
>>>>
>>>> P.S. I tested on two systems, both runs Archlinux x86_64.
>>> can you completely wipe the texmf-cache directory and then run
>>>
>>> mtxrun --generate
>>> context --make
>>>
>>> (there is a change in bytecode that gets not automatically noticed that
>>> can give that crash)
>>
>> I had the same issue and completely wiping the texmf-cache fixes it.
>>
>> @Vladimir: If you are using the luametatex package from AUR, then the
>> texmf-cache is located at \$HOME/.cache/luametatex.
>
> I'm receiving the super helpful error message:
>
>      ! error (lua): function call: no

there is not much context to present there as it means that deep down a
bad function token is expanded, something under control of the macro
package, which then has/is messed up

> Maybe some sort of cache versioning is in order to at least give a better error.

\ifdefined\pdfsavepos\else
\let\pdfsavepos \savepos
\let\pdflastxpos\lastxpos
\let\pdflastypos\lastypos
\fi

to cont-new.mkiv seems to work ok

Hans

-----------------------------------------------------------------
{"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8431480526924133, "perplexity": 21265.95497281511}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-29/segments/1593655880243.25/warc/CC-MAIN-20200702205206-20200702235206-00564.warc.gz"}