scilab crashes if a .bin file referenced in a lib had been removed and the associated function is called (REGRESSION)
Reported by Serge STEER
BUG DESCRIPTION:
----------------
scilab crashes if a .bin file referenced in a lib had been removed and the associated function is called
ERROR LOG:
----------
Une erreur fatale a été détectée par Scilab.
Veuillez vérifier les fonctions définies par l'utilisateur (ou celles des modules externes), elles devraient apparaître dans le suivi de la pile.
Ou sinon, vous pouvez reporter un bug sur http://bugzilla.scilab.org/ avec :
* un simple code qui reproduit le problème
* le résultat de [a, b] = getdebuginfo()
* l'information suivante :
[mir2:01395] Signal: Erreur de segmentation (11)
[mir2:01395] Signal code: Address not mapped (1)
[mir2:01395] Failing at address: (nil)
Pile d'appel :
1: 0x914da6 <JVM_handle_linux_signal> (/home/steer/git_scilab/master/scilab/java/jre1.8.0_51/lib/amd64/server/libjvm.so)
2: 0x90b6f3 < > (/home/steer/git_scilab/master/scilab/java/jre1.8.0_51/lib/amd64/server/libjvm.so)
3: 0x10b00 < > (/lib64/libpthread.so.0)
4: 0x40b239 <types::MacroFile::getNbOutputArgument()> (/home/steer/git_scilab/master/scilab/modules/ast/.libs/libsciast.so.6)
5: 0x1d1ca6 <ast::RunVisitorT<ast::ExecVisitor>::visitprivate(ast::CallExp const&)> (/home/steer/git_scilab/master/scilab/modules/ast/.libs/libsciast.so.6)
6: 0x1ccc3c <ast::RunVisitorT<ast::ExecVisitor>::visitprivate(ast::SeqExp const&)> (/home/steer/git_scilab/master/scilab/modules/ast/.libs/libsciast.so.6)
7: 0x1c1e59 <StaticRunner::launch()> (/home/steer/git_scilab/master/scilab/modules/.libs/libscilab-cli.so.6)
8: 0x1bb982 <RunScilabEngine> (/home/steer/git_scilab/master/scilab/modules/.libs/libscilab-cli.so.6)
9: 0x1c49 <main> (/home/steer/git_scilab/master/scilab/.libs/scilab-bin)
10: 0x206e5 <__libc_start_main> (/lib64/libc.so.6)
11: 0x21f9 < > (/home/steer/git_scilab/master/scilab/.libs/scilab-bin)
Fin de la pile
HOW TO REPRODUCE THE BUG:
-------------------------
cd /tmp;
mkdir buglib
mputl(["function test(a,b)";"disp([a,b])";"endfunction"],"buglib/test.sci")
genlib("blib","buglib")
blib=lib("buglib")
test(1,2) //ok
deletefile("buglib/test.bin")
clear
blib=lib("buglib")
test(1,2) //Crash
OTHER INFORMATION:
------------------
-->[a, b] = getdebuginfo();mprintf("%s\n",[a;b])
Total memory: 8116796
Used memory: 7600108
Free memory: 516688
Shared memory: 0
Buffers memory: 96
Cached memory: 4300076
Used -/+ buffers/cache: 3299936
Free -/+ buffers/cache: 4816860
Total swap: 2096124
Used swap: 566160
Free swap: 1529964
SCI: /home/steer/git_scilab/master/scilab
SCIHOME: /home/steer/.Scilab/scilab-branch-6.0
TMPDIR: /tmp/SCI_TMP_1683_Xm8ge7
Scilab Version: scilab-branch-6.0
Compilation date: Feb 10 2017
Compilation time: 13:41:16
Compileur version: 4.8.5
XML version: 2.9.1
Compiler Architecture: X64