Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Two issues found with -fsanitize=undefined
- X-seq: zsh-workers 36549
- From: Markus Trippelsdorf <markus@xxxxxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Two issues found with -fsanitize=undefined
- Date: Thu, 17 Sep 2015 19:24:33 +0200
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=simple; d=mail.ud10.udmedia.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=beta; bh=OonjFKUV8g9VNl8cRQP8Qlo1fs Awe3hMQaDxFPpoAEk=; b=SyUD1VwIpsVFjN1Jf5tT+bHARFtipCQUtmvtJs5InT RQCt6tNAYUOVlw2Gl7xwztua+SloLLmbz04oLUAtmx36UKgjKtQpyxF0neM9b2Gh EekJx8EivjDI1SzkfqswxPpKXqF+R82ujJrFkVZdYSXocwPVr5vVV+Dnm4U723Fv A=
- In-reply-to: <150917101633.ZM10051@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20150917075759.GA24365@x4> <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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author