Re: buildworld Stop in /usr/src/usr.sbin/bsnmpd/bsnmpd

From: Jason Evans <jasone_at_FreeBSD.org>
Date: Wed, 22 Mar 2006 14:56:27 -0800
Kevin Oberman wrote:
>>Date: Wed, 22 Mar 2006 14:24:08 -0800
>>From: Jason Evans <jasone_at_FreeBSD.org>
>>Kevin Oberman wrote:
>>>Not only did the fix to Makefile.inc1 not do the trick, but
>>>hand-building gnesnmptree and hand executing the commands to make the
>>>oid.h file didn't help a bit.
>>>
>>>I'm baffled. (And probably missing the obvious.)
>>
>>This isn't a very satisfying solution, but if you do the buildworld with 
>>MALLOC_OPTIONS=jZ, you will avoid the gensnmptree bug.
> 
> Thanks! It worked like a charm.
> 
> Any explanation as to why zeroing a malloc makes this work (as opposed
> to filling with 0xa5)? I'm sure confused.

If I remember correctly, gensnmptree uses a bitflag as a field in a 
malloc'ed structure.  phkmalloc uses 0xd0 for junk filling (2_at_11010000), 
whereas jemalloc uses 0xa5 (2_at_10100101).  Older versions of gensnmptree 
didn't initialize the flag, and the jemalloc junk filling in the least 
significant four bits caused it to think that the flag was set.

Jason
Received on Wed Mar 22 2006 - 21:56:31 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:54 UTC