daphne-project/daphne

ErrorHandler segfaults when provided a mlir::FusedLoc

Offen

#875 geöffnet am 23.10.2024

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C++ (84 Forks)auto 404
buggood first issue

Repository-Metriken

Stars
 (80 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

See #874 , part of the stack trace from there:

#0  0x00000000020f3293 in mlir::FileLineColLoc::getFilename() const ()
#1  0x000000000162bda9 in ErrorHandler::compilerError(mlir::Location, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#2  0x000000000162c5fd in ErrorHandler::compilerError(mlir::Operation*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#3  0x00000000016a0235 in VectorizedPipelineOpLowering::matchAndRewrite(mlir::daphne::VectorizedPipelineOp, mlir::daphne::VectorizedPipelineOpAdaptor, mlir::ConversionPatternRewriter&) const ()
#4  0x0000000001688273 in mlir::OpConversionPattern<mlir::daphne::VectorizedPipelineOp>::matchAndRewrite(mlir::Operation*, llvm::ArrayRef<mlir::Value>, mlir::ConversionPatternRewriter&) const ()

The stack trace displays what happens when the ErrorHandler is passed an instance of mlir::FusedLoc, instead of an instance of mlir::FileLineColLoc as it casts the provided loc without any checks.

Contributor Guide