Comments (10)
I'm working on a fix, btw.
from binaryen.
It's valid WTF-8, but it's not valid UTF-8 because the first code point is a surrogate.
from binaryen.
Should we avoid emitting that in the fuzzer, then? Or if we do want to fuzz it, should we escape it somehow when printing the string?
from binaryen.
It would be good to escape it in the fuzz output, I think. In general it's important to be fuzzing with strings that are not valid unicode.
from binaryen.
I'm not sure how to fix this in the fuzzer specifically, because the fuzzer isn't able to read the output from wasm-opt --fuzz-exec
. We could do it in the Literal printing logic for strings, which is what the fuzzer is reading, though I'm not sure if that would affect roundtripping - what do you think?
Btw I see this constantly now when I fuzz - several times a day at least. I'm reverting #6430 locally in order to be able to continue to fuzz for now.
from binaryen.
There's no way to round trip the fuzz exec output anyway, so I think any kind of escaping we can do both in C++ and in the JS fuzz wrapper should be fine, right?
from binaryen.
Fuzz exec output is just showing the output of printing a Literal. We do use the printed output of Literals in the text format as well, which we do need to roundtrip. Are you suggesting that --fuzz-exec
mode should have custom printing code instead, something like that?
from binaryen.
For strings, at least, the way we print them in Print.cpp
is unrelated to how we print them when they are Literal
s. We essentially already have that custom printing code.
from binaryen.
Am I misreading the code, then?
Lines 878 to 880 in 47bcca6
That does o << curr->value
using a std::ostream
and a Literal
, so I think it uses the same Literal
printing as --fuzz-exec
, which is here:
binaryen/src/tools/execution-results.h
Line 152 in 47bcca6
?
from binaryen.
StringConst
!= Const
!
from binaryen.
Related Issues (20)
- WATParser bug when parse implicit type definition HOT 1
- How to remove no-op exported functions? HOT 3
- Run (basic) StackIR optimizations in all binary writes? HOT 2
- wasm-split: WasmBinaryWriter::getDataSegmentIndex assertion related to DataDrop HOT 1
- What are the road blocks to using wasm-split multiple times? HOT 5
- Dynamic loading of custom passes in wasm-opt HOT 1
- CFGWalker with Single-thread failed HOT 4
- Unsubtyping fuzz bug HOT 1
- [Question] Multi-value Return using Tuple HOT 3
- wasm-split error without an element segment
- Segmentation fault although no optimization is done HOT 3
- Bug in recent "OptimizeInstructions: Optimize StructNew/ArrayNew forms" HOT 3
- wasm-opt segmentation fault with, but not with --debug HOT 1
- Import and run the upstream spec tests
- Use ChildTyper in the validator
- Use IRBuilder in the binary reader
- Support custom section annotations
- Support branch hinting
- Improvements enabled by new wat parser
- Adding unsubtyping to O3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from binaryen.