[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] Function argument corruption in 4.2.0

From: Eric Pruitt
Subject: Re: [bug-gawk] Function argument corruption in 4.2.0
Date: Sun, 12 Nov 2017 16:04:41 -0800
User-agent: NeoMutt/20170113 (1.7.2)

On Sun, Nov 12, 2017 at 06:31:51PM -0500, Andrew J. Schorr wrote:
> Thanks for the bug report. Did you try running under valgrind by any chance?

I haven't. I'll give that a shot tomorrow.

> > I've observed the corruption building against glibc and musl libc.
> > Unfortunately I haven't been able to create a simplified test case
> > or figure out which commit introduced the issue using "git bisect
> > run"
> Why didn't git bisect work? That seems like a sensible first step.

I'm not entirely sure. My daily debugging stack overflowed at that
point, and I stuck it on the back burner :P. I've attached the script I
I used and the output of a bisect attempt. The invocation follows:

    (   git reset --hard &&
        git bisect reset &&
        git bisect start HEAD gawk-4.1.4 &&
        git bisect run ./bisect-run.sh
    ) 2>&1 | tee git-bisect-output

Oh wait, this is interesting: the bisect reported a different commit
this time around that actually looks like it's related:

    commit f8424b236fabb881cc977b9e8e2e7c8debf56da0
    Author: Andrew J. Schorr <address@hidden>
    Date:   Wed Jul 6 18:11:10 2016 -0400

        Now that all fields are NUL-terminated, we can eliminate $n copying
        in the interpreter.

My earlier attempts always pointed to the merge commit
ea1a782c08d5a1948c22130f71a99e24f03b0d0a. I'm not sure what happened
here. Maybe there's a synchronization issue that was "fixed" by using
"tee" which I didn't do before since I was using tmux's scrollback

> > I am happy to provide a copy of the mdlint script and the test case
> > data if someone is willing to dig into the code. It depends on the
> > cmark binary (https://github.com/commonmark/cmark), but that could
> > be mocked out easily enough with something like "cat
> If it's possible to provide the source code, input, and expected
> output, that would make it a lot easier to debug this...

Sure -- I've had complaints where people would prefer no bug report over a bug
report without a **simple** test case and / or a patch, so I was reticent to
dump a bunch of attachments in the first message. These attachments are:

- mdlint: The AwK script in question.
- Makefile: This has a few rules to make testing my script easier.
- test.in: This is the file that's fed to mdlint for testing.
- test.out: This is the expected output of mdlint.
- cmark-output.xml: This is the XML generated by the cmark binary. If
  you don't have / want to build cmark, you'll need to change the
  command on line 1272 to "cat cmark-output.xml".


Attachment: bisect-run.sh
Description: Bourne shell script

Attachment: git-bisect-output
Description: Text document

Attachment: cmark-output.xml
Description: application/xml

Attachment: Makefile
Description: Text document

Attachment: mdlint
Description: Text document

Attachment: test.in
Description: Text document

Attachment: test.out
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]