Re: CVS commit: src/usr.bin/make
In article <20170421221544.6b4eaf...@cvs.netbsd.org>, Simon J. Gerratywrote: >-=-=-=-=-=- > >Module Name: src >Committed By: sjg >Date: Fri Apr 21 22:15:44 UTC 2017 > >Modified Files: > src/usr.bin/make: str.c > src/usr.bin/make/unit-tests: modmatch.exp modmatch.mk > >Log Message: >Str_Match: fix closure tests for [^] and add unit-test. I think this is just another bad copy of: https://nxr.netbsd.org/xref/src/sys/lib/libkern/pmatch.c and it is useful to make it available from userland, so others can use it without fixing bug after bug in it :-) christos
Re: CVS commit: src/usr.bin/make
Simon J. Gerratywrote: > wrote: > > > On Tue, Apr 11, 2017 at 05:30:13PM +, Simon J. Gerraty wrote: > > > Log Message: > > > Str_Match: allow [^a-z] to behave as expected. > > > > % env A=NetBSD-7-x86_64 make -V '${A:MNetBSD-[^0-1]-i386}' > > NetBSD-7-x86_64 > > Well that's interesting - thanks... Fixed, and a better unit-test added. Thanks
Re: CVS commit: src/usr.bin/make
wrote: > On Tue, Apr 11, 2017 at 05:30:13PM +, Simon J. Gerraty wrote: > > Log Message: > > Str_Match: allow [^a-z] to behave as expected. > > % env A=NetBSD-7-x86_64 make -V '${A:MNetBSD-[^0-1]-i386}' > NetBSD-7-x86_64 Well that's interesting - thanks...
Re: CVS commit: src/usr.bin/make
On Tue, Apr 11, 2017 at 05:30:13PM +, Simon J. Gerraty wrote: > Log Message: > Str_Match: allow [^a-z] to behave as expected. % env A=NetBSD-7-x86_64 make -V '${A:MNetBSD-[^0-1]-i386}' NetBSD-7-x86_64
Re: CVS commit: src/sys/kern
On 21.04.2017 18:09, Martin Husemann wrote: > On Fri, Apr 21, 2017 at 05:50:41PM +0200, Kamil Rytarowski wrote: > >> .section ".note.netbsd.ident", "", @note > > That is missing an "a" flag: > > .section ".note.netbsd.ident", "a", @note > > Look at readelf -a output, no program header is generated for your variant, > but if you add the flag, all is fine (and the file becomes executable again). > > > Martin > It works now, thank you! I hope that there are no other regressions in "real" software in regard to this change. signature.asc Description: OpenPGP digital signature
Re: CVS commit: src/sbin/fsck_ext2fs
On 21.04.2017 20:08, co...@sdf.org wrote: > On Fri, Apr 21, 2017 at 07:46:27PM +0200, Kamil Rytarowski wrote: >> >> It's a valid code. >> > > Other things fail: > http://releng.netbsd.org/builds/HEAD/201704202350Z/evbarm64-aarch64.build.failed > > /home/source/ab/HEAD/src/bin/ln/ln.c:357:1: error: function 'usage' > could be declared with attribute 'noreturn' [-Werror,-Wmissing-noreturn] > { > ^ > 1 error generated. > > I think that one is even more valid :-) > Sometimes we can specify WARNS=6 or similar in Makefiles to turn warnings into errors. signature.asc Description: OpenPGP digital signature
Re: CVS commit: src/sbin/fsck_ext2fs
On Fri, Apr 21, 2017 at 07:46:27PM +0200, Kamil Rytarowski wrote: > > It's a valid code. > Other things fail: http://releng.netbsd.org/builds/HEAD/201704202350Z/evbarm64-aarch64.build.failed /home/source/ab/HEAD/src/bin/ln/ln.c:357:1: error: function 'usage' could be declared with attribute 'noreturn' [-Werror,-Wmissing-noreturn] { ^ 1 error generated. I think that one is even more valid :-)
Re: CVS commit: src/sbin/fsck_ext2fs
> Date: Fri, 21 Apr 2017 17:47:22 + > From: co...@sdf.org > > /home/source/ab/HEAD-llvm/src/sbin/fsck_ext2fs/pass1.c:242:39: warning: > comparison of array 'dp->e2di_blocks' equal to a null pointer is always false > [-Wtautological-pointer-compare] > (EXT2_MAXSYMLINKLEN == 0 && dp->e2di_blocks == 0)) { > ^~~~ I am pretty sure this was supposed to be dp->ed2i_nblock, not vacuously true. Compare the analogous code in fsck_ffs/pass1.c, with the same comment over it.
Re: CVS commit: src/sbin/fsck_ext2fs
On 21.04.2017 19:47, co...@sdf.org wrote: > On Fri, Apr 21, 2017 at 01:33:05PM -0400, Christos Zoulas wrote: >> e2di_block is an array; can't be NULL, (clang) > > I'm guessing this is from > http://releng.netbsd.org/builds/HEAD-llvm/201704191240Z/amd64.build.failed > > > /home/source/ab/HEAD-llvm/src/sbin/fsck_ext2fs/pass1.c:242:39: warning: > comparison of array 'dp->e2di_blocks' equal to a null pointer is always false > [-Wtautological-pointer-compare] > (EXT2_MAXSYMLINKLEN == 0 && dp->e2di_blocks == 0)) { > ^~~~ > > 1 warning generated. > > How come that warning wasn't fatal? > It's a valid code. signature.asc Description: OpenPGP digital signature
Re: CVS commit: src/sbin/fsck_ext2fs
On Fri, Apr 21, 2017 at 01:33:05PM -0400, Christos Zoulas wrote: > e2di_block is an array; can't be NULL, (clang) I'm guessing this is from http://releng.netbsd.org/builds/HEAD-llvm/201704191240Z/amd64.build.failed /home/source/ab/HEAD-llvm/src/sbin/fsck_ext2fs/pass1.c:242:39: warning: comparison of array 'dp->e2di_blocks' equal to a null pointer is always false [-Wtautological-pointer-compare] (EXT2_MAXSYMLINKLEN == 0 && dp->e2di_blocks == 0)) { ^~~~ 1 warning generated. How come that warning wasn't fatal?
Re: CVS commit: src/sys/kern
On Fri, Apr 21, 2017 at 05:50:41PM +0200, Kamil Rytarowski wrote: > .section ".note.netbsd.ident", "", @note That is missing an "a" flag: .section ".note.netbsd.ident", "a", @note Look at readelf -a output, no program header is generated for your variant, but if you add the flag, all is fine (and the file becomes executable again). Martin
Re: CVS commit: src/sys/kern
On 12.02.2017 22:52, Valeriy E. Ushakov wrote: > Module Name: src > Committed By: uwe > Date: Sun Feb 12 21:52:46 UTC 2017 > > Modified Files: > src/sys/kern: exec_elf.c > > Log Message: > netbsd_elf_signature - look at note segments (phdrs) not note > sections. They point to the same data in the file, but sections are > for linkers and are not necessarily present in an executable. > > The original switch from phdrs to shdrs seems to be just a cop-out to > avoid parsing multiple notes per segment, which doesn't really avoid > the problem b/c sections also can contain multiple notes. > > > To generate a diff of this commit: > cvs rdiff -u -r1.87 -r1.88 src/sys/kern/exec_elf.c > > Please note that diffs are not public domain; they are subject to the > copyright notices on the relevant files. > > This change broke assembly framework of mine. (amd64) $ cat start.S .globl _start .section ".note.netbsd.ident", "", @note .long 2f-1f .long 4f-3f .long 1 1: .asciz "NetBSD" 2: .p2align 2 3: .long 70001 4: .p2align 2 .section .text _start: andq $0xfff0, %rsp subq $0x8, %rsp call main movq %rax, %rdi movq $0x1, %rax syscall $ cat minimal.c int main(void) { return 5; } $ gcc -nostdlib start.S minimal.c -o minimal This program reports invalid NetBSD executable now. It was inspired by https://wiki.netbsd.org/examples/netbsd_assembly/ Reverting this commit locally makes the executable work again. Is this a regression or is the template wrong? signature.asc Description: OpenPGP digital signature