I ran into a segfault when calling dwarf::expr::evaluate. I took a look at the code and the issue seemed to be a fairly straightforward in that when arguments is empty, end() == begin() and so end() - 1 is out of bounds. I believe using an iterator pointing before begin() is UB. I imagine we have different implementations on our systems so it didn't trigger before. Anyway, fix is simple.
I ran into a segfault when calling
dwarf::expr::evaluate
. I took a look at the code and the issue seemed to be a fairly straightforward in that whenarguments
is empty,end() == begin()
and soend() - 1
is out of bounds. I believe using an iterator pointing beforebegin()
is UB. I imagine we have different implementations on our systems so it didn't trigger before. Anyway, fix is simple.