The problem i'm experiencing is that I'm adding two extended precision
numbers and I get a segfault because one has a corrupted memory
address. I turn on MEMAUDIT=0x1d and I get an ARGCHK failure because
one of the arguments is has low bits set in flags (and is 0xdeadbeef).

So, I have a memory address which was allocated and I need to "go back
in time" to see what's happening with that memory address. (If it
changes in response to my code update, it presumably would only change
once - not when I only change the numeric value that I'm searching
for.)

In other words, I want to create a routine deadcheck() which reports
when it's being called with an address which matches the failing
address, along with a counter. Once I have this information, I can
perform a run where I stop when I reach a certain count of the
appearance of that memory address (or maybe every time, if the total
count is low), and inspect the stack to see what's going on there. I
am hoping that with this information I can zero in on what is being
corrupted, and when.

But, to do this, I need to run deadcheck every time memory gets
allocated / handed to J as a new empty array. (I also put in a
deadcheck in the gmp memory allocator, of course.)

So, ... I'm wondering where I can check all memory allocations.

--
Raul

On Sun, Nov 12, 2023 at 8:40 PM Henry Rich <[email protected]> wrote:
>
> I'm not sure I understand what you want to know.  The tpop stack holds
> the death warrants for recently allocated blocks.
>
> hhr
>
> On 11/12/2023 6:56 PM, Raul Miller wrote:
> > If I want to test all the addresses of "newly allocated pointers to
> > memory" from m.c, where should I do that?
> >
> > Thanks,
> >
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to