Quotes in .spec file cause core dump

Bug #1098396 reported by Paul J. Lucas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
New
High
Chris Hillery

Bug Description

For example, take the spec file:

test/rbkt/Queries/zorba/datetime/datetime-parse-date-la-uD-1.spec

that contains:

Result: $RBKT_SRC_DIR/ExpQueryResults/zorba/datetime/datetime-parse-date-la-uD-1.xml.res
Error: http://www.zorba-xquery.com/errors:ZOSE0007

If you change the Result line such that the path is with quotes like:

Result: "$RBKT_SRC_DIR/ExpQueryResults/zorba/datetime/datetime-parse-date-la-uD-1.xml.res"

and run:

ctest -R datetime-parse-date-la-uD-1

the testdriver dumps core:

#0 0x00007fff8fba3d46 in __kill ()
#1 0x00007fff89699df0 in abort ()
#2 0x00007fff92274a17 in abort_message ()
#3 0x00007fff922723c6 in default_terminate ()
#4 0x00007fff88ec0887 in _objc_terminate ()
#5 0x00007fff922723f5 in safe_handler_caller ()
#6 0x00007fff92272450 in std::terminate ()
#7 0x00007fff922735b7 in __cxa_throw ()
#8 0x00007fff9136241b in std::__throw_out_of_range ()
#9 0x00007fff9138bfd4 in std::string::substr ()
#10 0x00000001023735a4 in Specification::tokenize (this=0x7fff5d89bf68, str=@0x7fff5d89ab18, tokens=@0x7fff5d89ab30, delimiters=@0x7fff5d89ab10) at specification.h:259
#11 0x000000010236b1a1 in Specification::parseFile (this=0x7fff5d89bf68, str=<value temporarily unavailable, due to optimizations>, rbkt_src_dir=@0x7fff5d89bc30, rbkt_binary_dir=@0x7fff5d89bc28) at specification.h:327
#12 0x0000000102368263 in main (argc=2, argv=0x7fff5d89c0e8) at /Users/pjl/src/flwor/zorba/repo/trunk/zorba/test/rbkt/testdriver.cpp:237

It means that the code calls string::substr() with a value that is out of range.

Tags: testsystem
Revision history for this message
Paul J. Lucas (paul-lucas) wrote :

Not sure if Chris or Sorin is better. Feel free to reassign.

Also, for whoever fixes this, PLEASE move all that code out of the .h file and into the .cpp file.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.