Subject: clasp: num out of bounds in ProgramOptions::StringSlice::skip
Followup-For: Bug #623850
Package: clasp
Version: 2.0.0-2

I compiled the debug version of clasp (./configure.sh --config=debug)
and ran the following:

 $ gdb build/debug/bin/clasp
 [...]
 (gdb) break ProgramOptions::StringSlice::skip
 Breakpoint 1 at 0x47b830: file ../../../libprogram_opts/src/value_parser.cpp, 
line 94.
 (gdb) r
 The program being debugged has been started already.
 Start it from the beginning? (y or n) y
 Starting program: 
/home/tkren/asp+debian/clasp/clasp-2.0.0/build/debug/bin/clasp 

 Breakpoint 1, ProgramOptions::StringSlice::skip (this=0x7fffffffe050, 
num=18446744073709551615)
     at ../../../libprogram_opts/src/value_parser.cpp:94
 94     void StringSlice::skip(size_t num) {
 (gdb) step
 95             assert(ok() && num <= size());
 (gdb) step
 ok (this=0x7fffffffe050, num=18446744073709551615) at 
../../../libprogram_opts/src/value_parser.cpp:95
 95             assert(ok() && num <= size());
 (gdb) step
 error (this=0x7fffffffe050, num=18446744073709551615) at 
../../../libprogram_opts/program_opts/value_parser.h:39
 39             bool        error()    const { return (len_&1) != 0; }
 (gdb) step
 ProgramOptions::StringSlice::skip (this=0x7fffffffe050, 
num=18446744073709551615) at ../../../libprogram_opts/src/value_parser.cpp:95
 95             assert(ok() && num <= size());
 (gdb) step
 size (this=<value optimized out>, num=18446744073709551615) at 
../../../libprogram_opts/program_opts/value_parser.h:37
 37             size_t      size()     const { return len_>>1; }
 (gdb) step
 ProgramOptions::StringSlice::skip (this=<value optimized out>, 
num=18446744073709551615) at ../../../libprogram_opts/src/value_parser.cpp:95
 95             assert(ok() && num <= size());
 (gdb) step
 clasp: ../../../libprogram_opts/src/value_parser.cpp:95: void 
ProgramOptions::StringSlice::skip(size_t): Assertion `ok() && num <= size()' 
failed.

 Program received signal SIGABRT, Aborted.
 0x00007ffff730d165 in raise () from /lib/libc.so.6


It seems that StringSlice::skip gets called with num=0xFFFFFFFFFFFF on
Debian sid.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.38-2-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages clasp depends on:
ii  libc6                         2.11.2-13  Embedded GNU C Library: Shared lib
ii  libgcc1                       1:4.6.0-5  GCC support library
ii  libstdc++6                    4.6.0-5    The GNU Standard C++ Library v3
ii  libtbb2                       3.0+r147-1 parallelism library for C++ - runt

Versions of packages clasp recommends:
ii  gringo                        3.0.3-4    grounding tools for (disjunctive) 

Versions of packages clasp suggests:
pn  potassco-guide                <none>     (no description available)

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to