This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [PATCH] [JAVA] Double.parseDouble(null) throw NullPointerException
>>>>> "Jie" == Jie Liu <lj8175@gmail.com> writes:
Jie> RTEMS does not have virtual memory management, so there is no error
Jie> when access the 0 address on rtems.
Jie> So 'str->length()' donot throw NPE and just return an meaningless value.
If you compile the Java parts of the library with -fcheck-references, it
should work. This is something you have to set up as part of the port,
as it is decided at (libgcj-) configure time.
This won't help with the native code. IIRC in the end we just gave up
on that; if you wanted real correctness you would have to add a null
check at every dereference in the C++ code. I believe Andrew had a g++
patch to do this in the compiler, but it was rejected.
Tom