|
Message-ID: <aad46bb81b91250bdc5728d33f0c40a6@smtp.hushmail.com> Date: Wed, 17 Apr 2013 01:50:59 +0200 From: magnum <john.magnum@...hmail.com> To: john-dev@...ts.openwall.com Subject: Re: Segfaults probably caused by DEBUG code in memory.c On 17 Apr, 2013, at 1:33 , "jfoug" <jfoug@....net> wrote: > I just tested unstable, and MEM_ALLOC_SIZE==0 worked fine. Yup, committed now. > I would rather not have dyna use that define, but it certainly hurts > nothing. I applied your patch too but kept the memory stuff in memory.c only. This make it safer against someone reusing MEM_ALLOC_SIZE like you did, in the future. Hopefully this is settled now. The root issue was this: without this, Valgrind may tell you that a buffer allocated in this or that line, in this or that file[1], was busted in some other line and file[2]. But [1] was totally misleading, because that was just a much *earlier* call to mem_alloc_tiny() where there was an actual malloc() allocation going on behind the scenes. Extremely confusing until I understood what was going on and added this stuff. So any time you are tracking a buffer problem down, be sure to use -DDEBUG. magnum
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.