sdsl-lite icon indicating copy to clipboard operation
sdsl-lite copied to clipboard

cst-byte-test/child and cst-byte-test/edge fail when assertions are enabled

Open tsnorri opened this issue 9 years ago • 7 comments

The unit tests in question fail when compiled without -DNDEBUG.

Steps to reproduce:

  1. Clone sdsl-lite.
  2. Remove -DNDEBUG from compiler flags by e.g. patching CMakeLists.txt.
  3. cd build; cmake -DCMAKE_BUILD_TYPE=RelWithDebAndAssert ..; make -j8; make cst-byte-test

Expected results: unit tests passed.

Actual results: assertion failure in cst_sct3.hpp line 681. (Please see error-message.txt for details.) Removing the assertion in question reveals the other assertion failure in int_vector.hpp. (See error-message-2.txt.)

tsnorri avatar Mar 14 '16 09:03 tsnorri

the files (error-message-*.txt) are not accessible for me.

actually, now it works.

mpetri avatar Mar 14 '16 09:03 mpetri

In general I think we should remove the -NDEBUG compiler flag and just use different release types.

mpetri avatar Mar 14 '16 09:03 mpetri

@tsnorri I can't seem to reproduce this. Are you working on the current master branch?

mpetri avatar Mar 22 '16 09:03 mpetri

@tsnorri Thanks for the comment. Unftly, I was also not able to reproduce the issue on my machine.

simongog avatar Mar 22 '16 20:03 simongog

I was working on the master branch. I'll try again as soon as possible.

tsnorri avatar Mar 23 '16 14:03 tsnorri

This still happens to me even if I make a pristine clone of the repository and build the library and the tests on another workstation. Here's a complete build log if it's of any help.

tsnorri avatar Mar 23 '16 15:03 tsnorri

I did notice that just removing -DNDEBUG from CMakeLists.txt didn't reveal the failure as cmake adds the flag itself when setting the build type to Release.

tsnorri avatar Mar 23 '16 19:03 tsnorri