Surelog: Segfault in compilation step

Same large code base I’ve been pushing on, now encountering this segfault: uhdm_segfault.txt full. Again, I can’t provide the code which triggers this segfault.

UHDM::ExprEval::reduceExpr(UHDM::BaseClass const*, bool&, UHDM::BaseClass const*, UHDM::BaseClass const*) (\home\jodemme\Surelog\dbuild\third_party\UHDM\generated\src\ExprEval.cpp:1927)
SURELOG::CompileHelper::reduceExpr(UHDM::BaseClass*, bool&, SURELOG::DesignComponent*, SURELOG::CompileDesign*, SURELOG::ValuedComponentI*, std::filesystem::__cxx11::path const&, int, UHDM::BaseClass*, bool) (\home\jodemme\Surelog\src\DesignCompile\CompileExpression.cpp:774)
SURELOG::CompileHelper::getValue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, SURELOG::DesignComponent*, SURELOG::CompileDesign*, SURELOG::ValuedComponentI*, std::filesystem::__cxx11::path const&, int, UHDM::BaseClass*, bool, bool) (\home\jodemme\Surelog\src\DesignCompile\CompileExpression.cpp:1021)
operator() (\home\jodemme\Surelog\src\DesignCompile\CompileExpression.cpp:752)
std::__invoke_impl<UHDM::BaseClass*, SURELOG::CompileHelper::reduceExpr(UHDM::any*, bool&, SURELOG::DesignComponent*, SURELOG::CompileDesign*, SURELOG::ValuedComponentI*, const std::filesystem::__cxx11::path&, int, UHDM::any*, bool)::<lambda(const string&, const any*, const any*)>&, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, const UHDM::BaseClass*, const UHDM::BaseClass*>(std::__invoke_other, (unnamed struct) &) (\usr\include\c++\11\bits\invoke.h:61)
std::__invoke_r<UHDM::BaseClass*, SURELOG::CompileHelper::reduceExpr(UHDM::any*, bool&, SURELOG::DesignComponent*, SURELOG::CompileDesign*, SURELOG::ValuedComponentI*, const std::filesystem::__cxx11::path&, int, UHDM::any*, bool)::<lambda(const string&, const any*, const any*)>&, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, const UHDM::BaseClass*, const UHDM::BaseClass*>((unnamed struct) &) (\usr\include\c++\11\bits\invoke.h:114)
std::_Function_handler<UHDM::BaseClass*(const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, const UHDM::BaseClass*, const UHDM::BaseClass*), SURELOG::CompileHelper::reduceExpr(UHDM::any*, bool&, SURELOG::DesignComponent*, SURELOG::CompileDesign*, SURELOG::ValuedComponentI*, const std::filesystem::__cxx11::path&, int, UHDM::any*, bool)::<lambda(const string&, const any*, const any*)> >::_M_invoke(const std::_Any_data &, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<> > &, const UHDM::BaseClass *&&, const UHDM::BaseClass *&&) (\usr\include\c++\11\bits\std_function.h:290)
std::function<UHDM::BaseClass* (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, UHDM::BaseClass const*, UHDM::BaseClass const*)>::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, UHDM::BaseClass const*, UHDM::BaseClass const*) const (\usr\include\c++\11\bits\std_function.h:590)
UHDM::ExprEval::getValue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, UHDM::BaseClass const*, UHDM::BaseClass const*) (\home\jodemme\Surelog\dbuild\third_party\UHDM\generated\src\ExprEval.cpp:242)
UHDM::ExprEval::reduceExpr(UHDM::BaseClass const*, bool&, UHDM::BaseClass const*, UHDM::BaseClass const*) (\home\jodemme\Surelog\dbuild\third_party\UHDM\generated\src\ExprEval.cpp:1940)
SURELOG::CompileHelper::reduceExpr(UHDM::BaseClass*, bool&, SURELOG::DesignComponent*, SURELOG::CompileDesign*, SURELOG::ValuedComponentI*, std::filesystem::__cxx11::path const&, int, UHDM::BaseClass*, bool) (\home\jodemme\Surelog\src\DesignCompile\CompileExpression.cpp:774)
SURELOG::CompileHelper::getValue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, SURELOG::DesignComponent*, SURELOG::CompileDesign*, SURELOG::ValuedComponentI*, std::filesystem::__cx
[uhdm_segfault.txt](https://github.com/chipsalliance/Surelog/files/8711718/uhdm_segfault.txt)
x11::path const&, int, UHDM::BaseClass*, bool, bool) (\home\jodemme\Surelog\src\DesignCompile\CompileExpression.cpp:1021)
operator() (\home\jodemme\Surelog\src\DesignCompile\CompileExpression.cpp:752)
....

Very likely a Surelog bug rather than a UHDM bug. Addresses for this all of the args fail reads in lldb. Appears to be infinite recursion.

Commit daa52046ab877a1807a1233188ddb5d1db02c1d3.

$ /usr/bin/c++ -v
Using built-in specs.
COLLECT_GCC=/usr/bin/c++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.2.0-19ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-gBFGDP/gcc-11-11.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-gBFGDP/gcc-11-11.2.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.2.0 (Ubuntu 11.2.0-19ubuntu1)

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 19

Most upvoted comments

Yes, I believe this bug is fixed now.

Sorry I haven’t had the chance to peel the onion further.

On Mon, May 30, 2022, 9:07 PM alaindargelas @.***> wrote:

@teqdruid https://github.com/teqdruid, can we close this issue?

— Reply to this email directly, view it on GitHub https://github.com/chipsalliance/Surelog/issues/2942#issuecomment-1141646168, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALNXYDKG2NZ2725BES4MGLVMWGBLANCNFSM5WGIXPCA . You are receiving this because you were mentioned.Message ID: @.***>