Skip to content

Compiling with optimizations disabled results in runtime error #57

@matteo-meluzzi

Description

@matteo-meluzzi

When running a genmc executable compiled with optimizations disabled, I get a runtime error.
When running genmc with the default compiler flags, everything runs smoothly.

How to reproduce:

  1. checkout master branch
  2. autoreconf -i to generate the configure script
  3. ./configure AR=llvm-ar CXXFLAGS="-O0 -g" to generate Makefile
  4. make genmc to generate genmc executable
  5. ./genmc --print-exec-graphs tests/correct/litmus/LB2/variants/lb0.c
    outputs:
GenMC v0.10.0 (LLVM 15.0.7)
Copyright (C) 2023 MPI-SWS. All rights reserved.

*** Compilation complete.
*** Transformation complete.
Tip: Estimating state-space size. For better performance, you can use --disable-estimation.
libc++abi: terminating due to uncaught exception of type std::length_error: vector
zsh: abort      ./genmc --print-exec-graphs tests/correct/litmus/LB2/variants/lb0.c

In contrast the same steps except for
3) ./configure AR=llvm-ar
outputs

No errors were detected.
Number of complete executions explored: 3
Total wall-clock time: 0.11s

I am using MacOS 14, llvm@15 installed

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions