Michael Goffioul <michael.goffi...@gmail.com> writes: > On Sun, Jul 8, 2012 at 1:43 PM, Sébastien Villemot > <sebastien.ville...@ens.fr> wrote: > > Jordi Gutiérrez Hermoso <jord...@octave.org> writes: > > > On 8 July 2012 08:25, Sébastien Villemot <sebastien.ville...@ens.fr> > wrote: > >> What happens is that OpenJDK 7 changes the locale settings and, in > >> locale environments where the decimal separator is a comma and not a > >> point, that makes Octave crash when reading a decimal number (as simple > >> as "0.1"). > > > > A change in locale should not make Octave crash. Do you have a > > stripped-down example of how to reproduce this? I tried: > > > > jordi@Iris:~$ echo 0.1 > foo > > jordi@Iris:~$ LANG=fr_FR.UTF-8 octave --eval 'load foo' > > > > and I did not see a crash. > > Your example does not trigger a crash, of course. > > But OpenJDK is ran from an Oct-file, and I guess it bypasses some sanity > checks and cleanups done by Octave. Then the sscanf() function used from > the Octave parser becomes unable to parse "0.1". > > That's good that you've found a workaround, still I'd like to > understand what is crashing and why. From the debian bug report, I > understand that starting octave as "LANG=fr_FR.utf-8 octave" is the > way to make it crash. But what commands in octave do I need to use to > reproduce the crash?
Once the java package is loaded, Octave crashes as soon as the parser tries to read a decimal number. That can happen even before you type any command, if some PKG_ADD file contains a decimal number. The crash occurs at line 2420 of lex.ll (in Octave core 3.6.2). It fails because the sscanf() function cannot transform the lexer token into a double float. This obviously has to do with the decimal separator. > I will consider integrating the debian patch into main java package > source tree, but I'd like first to understand what's going on. Thanks. I admit that my own investigations were limited. As soon as I had understood that preventing OpenJDK from messing with the locale fixed the crash, I stopped investigating. -- Sébastien Villemot Researcher in Economics & Debian Maintainer http://www.dynare.org/sebastien Phone: +33-1-40-77-84-04 - GPG Key: 4096R/381A7594
pgp8yMhqYnIu0.pgp
Description: PGP signature
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ Octave-dev mailing list Octave-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/octave-dev