Skip to content

Rename assert_eq to assert_return - #3

Merged
binji merged 2 commits into
masterfrom
assert_return
Oct 7, 2015
Merged

binji merged 2 commits into
masterfrom
assert_return

Conversation

@dschuff

@dschuff dschuff commented Oct 7, 2015

Copy link
Copy Markdown
Member

This matches recent changes in the spec repo. I left assert_eq as an
alias for assert_return to accomodate existing tests for now (although
the semantics for FP compares are subtly different), but renamed the
enums and event names to assert_return. I also left the d8
and spec tests alone for now.

This matches recent changes in the spec repo. I left assert_eq as an
alias for assert_return to accomodate existing tests for now (although
the semantics for FP compares are subtly different), but renamed the
enums and event names to assert_return. I also left the d8
and spec tests alone for now.
@dschuff

dschuff commented Oct 7, 2015

Copy link
Copy Markdown
Member Author

I can't get the v8 native prototype to build right now. Is it broken or is it me?
Should I also update the spec and d8 tests?

@binji

binji commented Oct 7, 2015

Copy link
Copy Markdown
Member

I think v8-native needs to be updated to the latest version. The version that I have pinned right now doesn't build against the latest v8. I'll update it today.

@binji

binji commented Oct 7, 2015

Copy link
Copy Markdown
Member

Hm, looks like it is failing with a new error using variable sized arrays in wasm/encoder.cc. Not sure why this isn't failing on v8-native-prototype travis build.

Ah, it is because they build with -Wno-error

@titzer

titzer commented Oct 7, 2015

Copy link
Copy Markdown

Different warning settings for clang? It builds fine with v8's normal make
procedure.

On Wed, Oct 7, 2015 at 9:47 PM, Ben Smith [email protected] wrote:

Hm, looks like it is failing with a new error using variable sized arrays
in wasm/encoder.cc. Not sure why this isn't failing on v8-native-prototype
travis build.

—
Reply to this email directly or view it on GitHub
#3 (comment)
.

@dschuff

dschuff commented Oct 7, 2015

Copy link
Copy Markdown
Member Author

What do you think about this patch in particular? It shouldn't break anything in v8-native or spec tests.

@binji

binji commented Oct 7, 2015

Copy link
Copy Markdown
Member

lgtm, I'll rebase it manually (I hate merge commits :-)

@dschuff

dschuff commented Oct 7, 2015

Copy link
Copy Markdown
Member Author

OK. I assume you mean that you have local work which raced with this? If you pushed more frequently that would be less likely. Just sayin' :)

@dschuff

dschuff commented Oct 7, 2015

Copy link
Copy Markdown
Member Author

And if not, does github just do fast-forward merges by default, like git itself does? Or is there always a 'merge PR#XXX' commit?

@binji
binji merged commit 64fb062 into master Oct 7, 2015
@binji

binji commented Oct 7, 2015

Copy link
Copy Markdown
Member

Yeah, GH never does ff merges, AFAIK. :-(

@binji
binji deleted the assert_return branch October 7, 2015 20:55
@jcbeyler

jcbeyler commented Oct 7, 2015

Copy link
Copy Markdown

I have not seen it either, I think you have to do it this way
Jc

From: Ben Smith [mailto:[email protected]]
Sent: Wednesday, October 07, 2015 1:05 PM
To: WebAssembly/sexpr-wasm-prototype
Subject: Re: [sexpr-wasm-prototype] Rename assert_eq to assert_return (#3)

Yeah, GH never does ff merges, AFAIK. :-(

—
Reply to this email directly or view it on GitHubhttps://github.com//pull/3#issuecomment-146313005.

sumayyanc pushed a commit to pose-dev/wabt that referenced this pull request Aug 2, 2019
@keithw keithw mentioned this pull request Nov 28, 2022
sbc100 pushed a commit that referenced this pull request Jul 29, 2026
ASan, `spectest-interp --trace` on a module that imports a global and
also defines one:

==73766==ERROR: AddressSanitizer: heap-buffer-overflow on address
0x60e0000002a4
    READ of size 8 at 0x60e0000002a4 thread T0
#1 Thread::TraceSource::GetGlobalType(unsigned int) interp.cc:3022
        #2 Thread::TraceSource::Pick(unsigned int, Instr) interp.cc:2954
        #3 Istream::Trace(...) istream.cc:887
0x60e0000002a4 is located 12 bytes after 152-byte region
[0x60e000000200,0x60e000000298)

Noticed it while reading the trace helpers. `ModuleDesc::globals` and
`ModuleDesc::tables` hold only the defined entries, imports live in
`ModuleDesc::imports`. But the `global.set`/`table.*` immediate is the
module-level index, which counts imports first. One imported global plus
one defined global is already enough to run off the end.
`GetTableElementType` has the same shape at interp.cc:3026, reached from
`table.grow` and `table.fill`.

The garbage `ValueType` that comes back then decides how the operand
`Value` is read, so a debug build aborts on the `CheckType` assert in
interp.h and a release build prints an arbitrary reference index.

Both immediates now resolve against the instance, which is what the
`GlobalSet`, `DoTableGrow` and `DoTableFill` handlers already do.
Regression test added under test/interp.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants