help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Option "file" requires an argument


From: address@hidden
Subject: Re: Option "file" requires an argument
Date: Fri, 26 Mar 2021 18:09:50 +0100 (CET)

Thanks for reporting these documentation fixes and the crash/fix for it.

I hope your fixes will be added to the git repository, and/or to a future 
release of GNU smalltalk.

Also when reading the error that is thrown, this was sort of making it clear,
this may be a trivial observation, that it's a simple SIGSEGV caught by 
libsigsegv.

I've seen other similar errors such as:

kernel/../scripts/Package.st:31: Error occurred while not in byte code 
interpreter!!
libgst/.libs/libgst.so.7.1.3'backtrace_on_signal+0x57 [0xffff80ffbf2dc14a]

issued by gst-tool for some command line switches, note the similar (but 
slightly different) error.

By default the GNU smalltalk configure script detects it and if installed, 
enables libsigsegv.

When building GNU smalltalk with : ./configure --disable-generational-gc 
--with-system-libsigsegv=no

it disables due to --with-system-libsigsegv=no  libsigsegv.

The issue then becomes (for gnu smalltalk 3.2.91) :

# gst -f tests/lists1.st 5
5 4
false
true
1
1
6 5

# gst --file tests/lists1.st 5
Segmentation Fault (core dumped)

Note the simple core dump with the --file option, in this case because gst is 
compiled without libsigsegv.

Then with your fix:

# gst --file tests/lists1.st  5
5 4
false
true
1
1
6 5

So as far as I can see the fix that you posted works fine, and hopefully it 
gets added to GNU smalltalk.

Regards,
David Stes
 
----- Op 25 mar 2021 om 16:09 schreef Tino Calancha tino.calancha@gmail.com:

> The following two command lines should be equivalent:
> 
> gst -f tests/lists1.st 5
> gst --file tests/lists1.st 5
> 
> While the former works, the later throws this error:
> 
> gst: Aborted
> gst: Error occurred while not in byte code interpreter!!
> /usr/local/bin/../lib64/libgst.so.7(+0x736f7)[0x7f19b8a0b6f7]
> /lib64/libc.so.6(+0x3d530)[0x7f19b8574530]
> /lib64/libc.so.6(gsignal+0x145)[0x7f19b85744a5]
> /lib64/libc.so.6(abort+0x116)[0x7f19b855d864]
> /usr/local/bin/../lib64/libgst.so.7(+0x11c58)[0x7f19b89a9c58]
> /usr/lib64/libsigsegv.so.2(+0x20bc)[0x7f19b89940bc]
> /lib64/libc.so.6(+0x3d530)[0x7f19b8574530]
> gst(main+0x100)[0x4022a0]
> /lib64/libc.so.6(__libc_start_main+0xd5)[0x7f19b855eb25]
> gst(_start+0x2e)[0x4024de]
> 
> 
> --8<-----------------------------cut 
> here---------------start------------->8---
> commit 589b4354c34dd2bb2f57960a13910a12176119cf
> Author: Tino Calancha <ccalancha@suse.com>
> Date:   Thu Mar 25 15:46:18 2021 +0100
> 
>     * main.c (long_options): Option "file" requires an argument
> 
> diff --git a/main.c b/main.c
> index f28aad3e..a4a9128b 100644
> --- a/main.c
> +++ b/main.c
> @@ -132,7 +132,7 @@ static const struct option long_options[] = {
>    {"core-dump", 0, 0, 'c'},
>    {"declaration-trace", 0, 0, 'D'},
>    {"execution-trace", 0, 0, 'E'},
> -  {"file", 0, 0, 'f'},
> +  {"file", 1, 0, 'f'},
>    {"kernel-directory", 1, 0, OPT_KERNEL_DIR},
>    {"no-user-files", 0, 0, OPT_NO_USER},
>    {"no-gc-message", 0, 0, 'g'},
> --8<-----------------------------cut 
> here---------------end--------------->8---
> 
> On top of commit: dfe4b5660037c4d178853ee00458a75e51a88563



reply via email to

[Prev in Thread] Current Thread [Next in Thread]