[M3devel] crashes everywhere
Tony Hosking
hosking at cs.purdue.edu
Wed Aug 22 18:01:05 CEST 2007
On Aug 22, 2007, at 11:39 AM, Dragiša Durić wrote:
> It is not... It was a bug I've explained in my replly to message you
> replied to...
>
> My code triggers it, but I suppose there is problem with
> CheckStoreTraced tracing through REF to C structure... Compiler did
> not
> complain, ot it did not generate correct info about "untracedness" of
> "REF to C structure"... I've fixed my code, but I do not think this
> (my
> message you replied show it) is correct way for CM3 to react to bug in
> code logic.
On reflection, it seems that the only way you could create a "REF" to
a C structure is in UNSAFE code. In which case, you are the one
responsible for the bug, rather than the compiler needing to warn
you. Programmers of UNSAFE code need to be very careful when
constructing REFs that are not obtained via NEW (I would argue that
LOOPHOLE should almost never be used to construct a REF, except when
absolutely necessary). Perhaps an appropriate warning would be for
such loopholing. Then again programmers of UNSAFE code are assumed
to know what they are doing.
Of course, in safe code the only way to get a REF is using NEW, so
there should be no problems there.
>
> dd
>
> On Wed, 2007-08-22 at 11:31 -0400, Tony Hosking wrote:
>> I can't speak for m3gdb, but something seems seriously wrong with
>> your installation. What program is causing this crash? Please also
>> tell me the version number of ThreadPThread.m3. The most recent
>> version is 1.48 of 2007-08-20.
>>
>> On Aug 22, 2007, at 5:44 AM, Dragiša Durić wrote:
>>
>>> ***
>>> *** runtime error:
>>> *** An array subscript was out of range.
>>> *** file "../src/runtime/common/RTCollector.m3", line 2316
>>> ***
>>>
>>> m3gdb, on setting lang to Modula-3 (capital M) ant bt, gives this:
>>>
>>> (m3gdb) bt
>>> #0 0x00d54402 in ?? ()
>>> #1 0x430c7ba0 in raise () from /lib/libc.so.6
>>> #2 0x430c94b1 in abort () from /lib/libc.so.6
>>> #3 0x00eaf2ff in Crash () at RTOS.m3:20
>>> #4 0x00ea1624 in Crash (msg=NIL) at RTProcess.m3:65
>>> #5 0x00e9ed85 in EndError (crash=TRUE) at RTError.m3:115
>>> #6 0x00e9ea3a in MsgS (file=16_00ed7368, line=2316,
>>> msgA=16_00ed8ee8,
>>> msgB=16_00ed3530, msgC=16_00ed8ee8) at RTError.m3:40
>>> #7 0x00e9f212 in Crash (a=
>>> ../../gdb/gdb/m3-util.c:1057: internal-error: note_is_cm3: Assertion
>>> `compiler_kind != ck_pm3' failed.
>>> A problem internal to GDB has been detected,
>>> further debugging may prove unreliable.
>>>
>>> I am using cvshead cm3, as of few days ago.
>>> --
>>> Dragiša Durić <dragisha at m3w.org>
>>
> --
> Dragiša Durić <dragisha at m3w.org>
More information about the M3devel
mailing list