Bug 104795

Summary: Bug in awk (core dump, easy to reproduce)
Product: Base System Reporter: Oliver Fromme <olli>
Component: binAssignee: ru <ru>
Status: Closed FIXED    
Severity: Affects Only Me CC: olli
Priority: Normal    
Version: 6.2-PRERELEASE   
Hardware: Any   
OS: Any   

Description Oliver Fromme 2006-10-25 14:10:22 UTC
	Our awk (bsd awk) seems to coredump when a function
	locally assigns a string to a parameter that was
	initialized by the function call to a non-zero
	numeric value.

Fix: 

unknown
How-To-Repeat: 
	This is the smallest snippet that reproduces the
	problem described above:

	# awk 'function f(x) {x=""} BEGIN {f(1)}'
	awk in free(): error: junk pointer, too low to make sense
	Abort trap (core dumped)
Comment 1 ru freebsd_committer freebsd_triage 2006-10-25 16:29:41 UTC
Responsible Changed
From-To: freebsd-bugs->ru

I'll look into it.  It's unfortunately not a BSD awk, but a one-true-awk, 
externally maintained.  We have sent a pool of local fixes upstream, but 
didn't hear back from Brian Kernighan yet.
Comment 2 dfilter service freebsd_committer freebsd_triage 2006-10-25 22:23:39 UTC
ru          2006-10-25 21:23:21 UTC

  FreeBSD src repository

  Modified files:
    usr.bin/awk          Makefile 
  Added files:
    usr.bin/awk          tran.c.diff 
  Log:
  Fix a bug converting a variable from the numeric type to a string.
  
  PR:             bin/104795
  MFC after:      3 days
  
  Revision  Changes    Path
  1.14      +1 -1      src/usr.bin/awk/Makefile
  1.1       +22 -0     src/usr.bin/awk/tran.c.diff (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 ru freebsd_committer freebsd_triage 2006-10-25 22:23:45 UTC
State Changed
From-To: open->patched

Fixed in HEAD.
Comment 4 dfilter service freebsd_committer freebsd_triage 2006-10-29 07:27:44 UTC
ru          2006-10-29 07:27:27 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_6)
    usr.bin/awk          Makefile 
  Added files:           (Branch: RELENG_6)
    usr.bin/awk          tran.c.diff 
  Log:
  MFC: Fix a bug converting a variable from the numeric type to a string.
  
  PR:             bin/104795
  Approved by:    re (hrs)
  
  Revision  Changes    Path
  1.12.2.2  +1 -1      src/usr.bin/awk/Makefile
  1.1.2.1   +22 -0     src/usr.bin/awk/tran.c.diff (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 ru freebsd_committer freebsd_triage 2006-10-29 11:02:48 UTC
State Changed
From-To: patched->closed

Fixed in RELENG_6.