sbc100 wrote:
I used `wasm-reduce` on the `.ll` file and it looks like you were correct. The
result was:
```
target datalayout =
"e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-f128:64-n32:64-S128-ni:1:10:20"
target triple = "wasm32-unknown-emscripten"
nikic wrote:
@sbc100 That wasm is not necessarily a miscompile, it may be UB in the source
program, if it uses a negative number in an *unsigned* variable to index an
array. Is the affected code clean under ubsan? (See
https://github.com/llvm/llvm-project/issues/108770 for a similar report tha
sbc100 wrote:
Perhaps yes. Do you know of any way to reduce the input program into something
we can try to inspect. The preprocessed C++ file is over 100,000 lines :-/
https://github.com/llvm/llvm-project/pull/107257
___
cfe-commits mailing list
cf
sbc100 wrote:
I bisecting this emscripten (wasm32-unknown-emscripten) miscompile to this PR:
https://github.com/emscripten-core/emscripten/issues/22794.
It looks like llvm is generating a load with a negative office (which is not
supported under wasm). There is a reproducer in that but and I
efriedma-quic wrote:
> Should be fixed by
> https://github.com/llvm/llvm-project/commit/940f89255e4a3982d94dad57837e8e658092af78.
I quickly glanced through the other uses of setIsInBounds in LLVM; the one in
CodeGenPrepare seems suspicious.
https://github.com/llvm/llvm-project/pull/107257
___
zeux wrote:
Confirming this fixes the original problem on the larger codebase, thanks!
https://github.com/llvm/llvm-project/pull/107257
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
nikic wrote:
Should be fixed by
https://github.com/llvm/llvm-project/commit/940f89255e4a3982d94dad57837e8e658092af78.
https://github.com/llvm/llvm-project/pull/107257
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-b
nikic wrote:
Reduced: https://llvm.godbolt.org/z/TPdd9qore
I believe the problem is this line:
https://github.com/llvm/llvm-project/blob/c05e29bff036060f0811b887a92715104abdceb5/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp#L2513
This does an in-place modification of the GEP, but on
efriedma-quic wrote:
Reproduced: https://godbolt.org/z/G4jrhdjef . Looks like an instcombine bug.
https://github.com/llvm/llvm-project/pull/107257
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/
zeux wrote:
Here's a slightly smaller reproducer that just reads one element from the
array. Similarly, this crashes because the compiler generates a load from an
absolute `-1` address. The crash is after the first `printf` call in this case
during the computation of the argument to the second
zeux wrote:
This change leads to a miscompilation; I've extracted a somewhat minimal repro
case from the referenced issue above, in the comment:
https://github.com/zeux/pugixml/issues/629#issuecomment-2346839855
The code, when compiled with `-O2 -g` by latest clang on Linux/X64, generates
the
https://github.com/hazzlim closed
https://github.com/llvm/llvm-project/pull/107257
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hazzlim wrote:
Nice - CI seems happy, so I plan to land this later today if no objections.
https://github.com/llvm/llvm-project/pull/107257
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm
https://github.com/nikic approved this pull request.
LG if CI is happy.
https://github.com/llvm/llvm-project/pull/107257
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
14 matches
Mail list logo