Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PATCH] tru64: compile (src/nci.c) and runtime (src/memory.c)

5 views
Skip to first unread message

Jarkko Hietaniemi

unread,
Dec 3, 2006, 4:54:03 PM12/3/06
to Perl6 Internals List
Two patches, the first is needed for parrot trunk to compile at all
in Tru64, the second one is needed to dodge dozens of core dumps.
There still are some, will take a closer look when I have more time,
but least this way there is less wading in core dumps.

In more detail:

The first one is required because otherwise the strange 0xc4 in the
string constant makes the tru64 compiler quite unhappy. (I haven't
looked in detail but I think that without extra flags the tru64 compiler
allows only pure ASCII in string constants).

The second one: in tru64 malloc/calloc/realloc of zero bytes returns
a NULL ptr (quite logical, in a way: you couldn't put anything in a
memory block of zero bytes...). I guess one could be fancier and
add a probe for this feature in Configure.pl, but I was feeling lazy.

nativecall.pl.pat
memory.c.pat

Jarkko Hietaniemi

unread,
Dec 4, 2006, 11:04:33 AM12/4/06
to Perl6 Internals List
> The second one: in tru64 malloc/calloc/realloc of zero bytes returns
> a NULL ptr (quite logical, in a way: you couldn't put anything in a
> memory block of zero bytes...). I guess one could be fancier and
> add a probe for this feature in Configure.pl, but I was feeling lazy.

A third alternative would be to investigate why would anyone be
allocating zero bytes; this might indicate a more serious error,
depending on what the caller was expecting/intending and what were
they going to do with the result.


0 new messages