harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Enrico Migliore <enrico.migli...@fatti.com>
Subject Re: [sablevm] SIGSEGV signal received from Cygwin
Date Fri, 07 Apr 2006 12:29:35 GMT

Hi Etienne,

>Enrico Migliore wrote:
>>I debugged the classical HelloWorld class with DDD and found the problem
>>in the following function:
>>pthread_once(...);    <---- SEGSEGV  signal
>That's definitely a cygwin bug.  I see.
The SEGSEGV signal is issued by Windows when the program does an 
"Illegal storage access".
The following simple example does receive the signal:

void my_function (char *pippo)
    pippo[0] = '\0';

int main (int argc, char** argv)
    my_function("Hello World");
    return 0;

Yet, I remember, that in JCHEVM I had to remove the POPT_AUTOHELP string 
in a struct in order not to receive that signal,
therefore, I'm pretty much sure that somewhere in the Pthread library 
there's an access to an area used to initialize constants:
something that maybe GCC likes but Windows doesn't.
That's just a guess.

>>In any case, before starting the port, I think that I and the people who
>>would like to help, will have analyze the code file by file.
>Actually, you should really start looking at:
> src/libsablevm/include/jni_system_specific.h
> src/libsablevm/system.c
> src/libsablevm/system.h
>These are the files which contain system-specific code.  Outside of
>these files, the only real dependencies are POSIX calls.  [I think
>there's some exception in System.getCurrentMillis() implementation that
>shouldn't even be in the VM to start with, as there's no VM-specific
>functionality in it...  I had to live with Classpath's decisions on
>their VM interface.]
>If you really want to read every single source file (!), then you should
>0.1) [prerequisite] read the JVMS fully, a few times over
>0.2) [prerequisite] read the JNI spec fully, a few times over
>1) read my Ph.D. thesis
>2) read the documents in doc/
>3) ask questions on sablevm-devel@ for clarifications
>Going that deep shouldn't be necessary, though.  Identifying POSIX
>dependencies and replacing them with VMI-port calls should be sufficient
>to start with.
The documentation included in SableVM trunk is more than good. 
Therefore, I would like to try do this job. I'm not sure I'll succeed 
but I want to

As far as the port is concerned, there are 3 things to talk about:

build system in MSVC
to my knowledge, MSVC doesn't have a build system like UNIX (autotool + 
configure) therefore, I think that the "config.h" file will have to be 
built manually.

how to modify the source files?
Let's say that removing a POSIX dependancy in a SableVM file means: 
replacing some lines of codes and replacing some include files. How am I 
suppost to deal with this kind of thing? Should I modify the trunk or my 

how to track source modifications
Let's say that one source file gets modified by one of SableVM 
developers, and another is added to the trunk. Should I rely on SVN to 
know where the modifications were done?


Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org

View raw message