dino-lang / dino

The programming language DINO

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dino aborts with --dump param

rofl0r opened this issue · comments

/seed/home/rofl/introduction[master]# gdb --args ../dino/DINO/dino --dump sas.d #oberon2.sas 
GNU gdb (GDB) 7.6.2
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /seed/home/rofl/dino/DINO/dino...done.
(gdb) b abort
Breakpoint 1 at 0x41f590
(gdb) r
Starting program: /seed/home/rofl/introduction/../dino/DINO/dino --dump sas.d
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ff9000

Breakpoint 1, 0x00007ffff7d87d3a in abort () from /lib/ld-musl-x86_64.so.1
(gdb) up
#1  0x0000000000424d56 in dino_main (argc=3, argv=0x7fffffffec38, envp=0x7fffffffec58)
    at d_dino.c:1663
1663            d_unreachable ();
(gdb) p option
$1 = 0x86f720 "--"

this is with sabotage linux/x86_64 based on musl libc.

Thank you. I reproduced the bug. I think the problem is in a wrong command line description. I'll fix it this weekend.

from a cursory investigation it appears the command line parser module was changed to split "--foo" style options into the parts "--" and "foo", however the consumer (here dino) wasn't adapted and tries to parse the option as a single string.

I fixed it. Command line arguments can have parameter. And parameter dump (for -i argument) conflicted with argument --dump. Fix was in change parameter dump into dumpfile.

thanks!