Re: awk(1) segfaults when building kernel modules

2011-08-11 Thread Ruslan Ermilov
On Wed, Aug 10, 2011 at 10:12:11PM +0400, Test Rat wrote:
 `make -s buildkernel' seems to contain lots of segfaults after recent
 update of one-true-awk in r224731. It chokes on sys/conf/kmod_syms.awk.
 The case can be reduced to
 
   $ awk 'BEGIN { delete ARGV[1] } END { print ARGV[1] }' blah
   [...]

Should be fixed in r224776; please confirm.


Cheers,
-- 
Ruslan Ermilov
r...@freebsd.org
FreeBSD committer
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: awk(1) segfaults when building kernel modules

2011-08-11 Thread Test Rat
Ruslan Ermilov r...@freebsd.org writes:

 On Wed, Aug 10, 2011 at 10:12:11PM +0400, Test Rat wrote:
 `make -s buildkernel' seems to contain lots of segfaults after recent
 update of one-true-awk in r224731. It chokes on sys/conf/kmod_syms.awk.
 The case can be reduced to
 
   $ awk 'BEGIN { delete ARGV[1] } END { print ARGV[1] }' blah
   [...]

 Should be fixed in r224776; please confirm.

Confirmed, it no longer crashes with either above example or when
building kernel modules.

--
FreeBSD 9.0-BETA1 r224776M amd64
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


awk(1) segfaults when building kernel modules

2011-08-10 Thread Test Rat
`make -s buildkernel' seems to contain lots of segfaults after recent
update of one-true-awk in r224731. It chokes on sys/conf/kmod_syms.awk.
The case can be reduced to

  $ awk 'BEGIN { delete ARGV[1] } END { print ARGV[1] }' blah
  [...]
  Program received signal SIGSEGV, Segmentation fault.
  0x0040b778 in isclvar (s=0x0) at 
/usr/src/usr.bin/awk/../../contrib/one-true-awk/lib.c:674
  674 if (!isalpha((uschar) *s)  *s != '_')
  (gdb) bt
  #0  0x0040b778 in isclvar (s=0x0) at 
/usr/src/usr.bin/awk/../../contrib/one-true-awk/lib.c:674
  #1  0x004092d7 in initgetrec () at 
/usr/src/usr.bin/awk/../../contrib/one-true-awk/lib.c:92
  #2  0x00409397 in getrec (pbuf=0x6267e0, pbufsize=0x6248a8, 
isrecord=1)
  at /usr/src/usr.bin/awk/../../contrib/one-true-awk/lib.c:113
  #3  0x0040cd73 in program (a=0x8010830e8, n=258) at 
/usr/src/usr.bin/awk/../../contrib/one-true-awk/run.c:193
  #4  0x0040cbd0 in execute (u=0x8010830d0) at 
/usr/src/usr.bin/awk/../../contrib/one-true-awk/run.c:162
  #5  0x0040caaa in run (a=0x8010830d0) at 
/usr/src/usr.bin/awk/../../contrib/one-true-awk/run.c:137
  #6  0x0040bf85 in main (argc=2, argv=0x7fffd290) at 
/usr/src/usr.bin/awk/../../contrib/one-true-awk/main.c:183

Anyone else?
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: awk(1) segfaults when building kernel modules

2011-08-10 Thread Navdeep Parhar
On Wed, Aug 10, 2011 at 11:12 AM, Test Rat ttse...@gmail.com wrote:
 `make -s buildkernel' seems to contain lots of segfaults after recent
 update of one-true-awk in r224731. It chokes on sys/conf/kmod_syms.awk.
...

 Anyone else?

I see this too.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: awk(1) segfaults when building kernel modules

2011-08-10 Thread Alexander Best
On Wed Aug 10 11, Navdeep Parhar wrote:
 On Wed, Aug 10, 2011 at 11:12 AM, Test Rat ttse...@gmail.com wrote:
  `make -s buildkernel' seems to contain lots of segfaults after recent
  update of one-true-awk in r224731. It chokes on sys/conf/kmod_syms.awk.

just out of curiosity: what's the point of doing a vendor import during a
beta phase? isn't this exactly the kind of stuff you DON'T want to do, because
it can only turn out badly?

imho r224731 should completely be reverted. aren't those exactly the kind of
commits re@ shouldn't approve?

cheers.
alex

 ...
 
  Anyone else?
 
 I see this too.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: awk(1) segfaults when building kernel modules

2011-08-10 Thread Ruslan Ermilov
On Wed, Aug 10, 2011 at 08:02:32PM +, Alexander Best wrote:
 On Wed Aug 10 11, Navdeep Parhar wrote:
  On Wed, Aug 10, 2011 at 11:12 AM, Test Rat ttse...@gmail.com wrote:
   `make -s buildkernel' seems to contain lots of segfaults after recent
   update of one-true-awk in r224731. It chokes on sys/conf/kmod_syms.awk.
 
 just out of curiosity: what's the point of doing a vendor import during a
 beta phase? isn't this exactly the kind of stuff you DON'T want to do, because
 it can only turn out badly?

The previous version had a bug in handling the -v option
since the last import.  I sent a patch to bwk@ months ago,
but he only released the new version that included a fix
on August 7.

Unfortunately, while fixing another bug (fixed day 1 bug
that resurrected deleted elements of ARGV when used as
filenames (in lib.c).), not all code was fixed, and a NULL
pointer deference bug is triggered by the following code
snippet:

awk 'BEGIN{delete ARGV[1]}{}' arg

%%%
Index: head/contrib/one-true-awk/lib.c
===
--- head/contrib/one-true-awk/lib.c (revision 224760)
+++ head/contrib/one-true-awk/lib.c (working copy)
@@ -89,8 +89,13 @@
char *p;
 
for (i = 1; i  *ARGC; i++) {
-   if (!isclvar(p = getargv(i))) { /* find 1st real filename */
-   setsval(lookup(FILENAME, symtab), getargv(i));
+   p = getargv(i); /* find 1st real filename */
+   if (p == NULL || *p == '\0') {  /* deleted or zapped */
+   argno++;
+   continue;
+   }
+   if (!isclvar(p)) {
+   setsval(lookup(FILENAME, symtab), p);
return;
}
setclvar(p);/* a commandline assignment before filename */
%%%

 imho r224731 should completely be reverted. aren't those exactly the kind of
 commits re@ shouldn't approve?


-- 
Ruslan Ermilov
r...@freebsd.org
FreeBSD committer
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org