Questions about Void, NULL and 0x0

"Germán Arias [email protected] [gobo-eiffel]" <[email protected]> Fri, 8 Nov 2019 13:36:17 -0600
Newsgroups gmane.comp.lang.eiffel.gobo.general
Message-ID <[email protected]>
Hi,

Attached is a simple Void test. As you can see the c function return a
char that is not attached. However it pass the test "attached get_string
as p then". With gec it compiles and run without problem. The output is:

[german@localhost void-test]$ ./void_test
p is attached.
0x402482
UH=EF=BF=BD=EF=BF=BDH=EF=BF=BDE=EF=BF=BD]=EF=BF=BDUH=EF=BF=BD=EF=BF=BDH=EF=
=BF=BD=EF=BF=BD =EF=BF=BD=EF=BF=BD=EF=BF=BDE=EF=BF=BD

With ISE (C inline is different but is the same C function) it compiles
but crash at run time. The output is:

[german@localhost void-test]$ ./void_test
p is attached.
0x0

void_test: system execution failed.
Following is the set of recorded exceptions:

******************************** Thread exception
*****************************
In thread=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Root =
thread=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0x=
0 (thread id)
***************************************************************************=
****
---------------------------------------------------------------------------=
----
Class / Object=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Routine=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Natur=
e of exception=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
Effect
---------------------------------------------------------------------------=
----
VOID_TEST=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 root'=
s creation=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Segmentation fault:
<00007F574488E558>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0 Operating system signal.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
Exit
---------------------------------------------------------------------------=
----
VOID_TEST=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 root'=
s creation
<00007F574488E558>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0 Routine failure.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
Exit
---------------------------------------------------------------------------=
----

As far as I know 0x0 mean a NULL pointer, right?. So why it pass the
attached test? In this case the application compiled with gec don't
crash, But have some crashes with some eiffel-iup examples. What is
wrong here? I misunderstood something about Void at Eiffel? I didn't ran
a test on Liberty Eiffel, since I don't have problems with it. Any
advice? Thanks in advance.

Germ=C3=A1n




[Non-text portions of this message have been removed]



------------------------------------
Posted by: =3D?UTF-8?Q?Germ=3Dc3=3Da1n_Arias?=3D <[email protected]>
------------------------------------

To Post a message, send it to:   [email protected]
To Unsubscribe, send a blank message to: gobo-eiffel-unsubscribe-B11MqFFcr06IwRZHo2/[email protected]=
m