zsh-workers
 help / color / mirror / code / Atom feed
From: Markus Trippelsdorf <markus@trippelsdorf.de>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-workers@zsh.org
Subject: Re: Two issues found with -fsanitize=undefined
Date: Thu, 17 Sep 2015 19:24:33 +0200	[thread overview]
Message-ID: <20150917172433.GA431@x4> (raw)
In-Reply-To: <150917101633.ZM10051@torch.brasslantern.com>

On 2015.09.17 at 10:16 -0700, Bart Schaefer wrote:
> On Sep 17,  9:57am, Markus Trippelsdorf wrote:
> }
> } I've build zsh trunk with -fsanitize=undefined and two issue popped up
> } while running the testsuite:
> 
> It would be helpful if you included at least part of the output (after the
> "for:") to indicate WHICH tests reported these errors.
> 
> }  compmatch.c:341:6: runtime error: null pointer passed as argument 2, which is declared to never be null}
> } Test ./Y02compmatch.ztst failed: output differs from expected as shown above for:
> 
> Could be anything.  The error indicates that "matchbuf" is NULL at the
> point where we expect to copy it into a new buffer, but if there is a
> deeper reason why that is unexpectedly NULL it would be better to fix
> that than to simply skip the copy.

Sorry:

./Y02compmatch.ztst: starting.
*** /tmp/zsh.ztst.out.27917     Thu Sep 17 19:20:46 2015
--- /tmp/zsh.ztst.tout.27917    Thu Sep 17 19:20:46 2015
***************
*** 1,3 ****
  line: {tst nolistbeep }{}
! COMPADD:{}
  INSERT_POSITIONS:{14}
--- 1,3 ----
  line: {tst nolistbeep }{}
! COMPADD:{compmatch.c:341:6: runtime error: null pointer passed as argument 2, which is declared to never be null}
  INSERT_POSITIONS:{14}
Test ./Y02compmatch.ztst failed: output differs from expected as shown above for:
  example1_list=(
        kshoptionprint        shglob              
        listambiguous         shinstdin           
        listbeep              shnullcmd           
        listpacked            shoptionletters     
        listrowsfirst         shortloops          
        listtypes             shwordsplit
   )
 options_matcher='L:|[nN][oO]= M:_= M:{A-Z}={a-z}'
 test_code $options_matcher example1_list
 comptest $'tst nolistbee\t'
Was testing: Documentation example for options, input "nolistbee"
./Y02compmatch.ztst: test failed.

And it is quite easy to reproduce (with gcc-5):

zsh-code % ./.preconfig
zsh-code % CC="gcc -fsanitize=undefined" ./configure 
zsh-code % make && make check 

BTW why isn't the make -j option passed on?
e.g. "make -j4" still builds single threaded.

-- 
Markus


  reply	other threads:[~2015-09-17 17:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-17  7:57 Markus Trippelsdorf
2015-09-17 17:16 ` Bart Schaefer
2015-09-17 17:24   ` Markus Trippelsdorf [this message]
2015-09-17 17:41     ` Bart Schaefer
2015-09-19 19:57 ` Peter Stephenson
2015-09-19 20:18   ` Markus Trippelsdorf
2015-09-19 22:35     ` Peter Stephenson
2015-09-20  4:09       ` Bart Schaefer
2015-09-21 12:46   ` Peter Stephenson
2015-09-21 19:13 ` Peter Stephenson
2015-09-21 20:04   ` Markus Trippelsdorf
2015-09-21 20:21     ` Peter Stephenson
2015-09-21 20:34       ` Markus Trippelsdorf
2015-09-21 20:56         ` Bart Schaefer
2015-09-22  0:02           ` Markus Trippelsdorf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150917172433.GA431@x4 \
    --to=markus@trippelsdorf.de \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).