Skip to content

Conversation

@tlively
Copy link
Member

@tlively tlively commented Jul 12, 2019

For pthread builds.

Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is passive segments part of bulk memory, or pthreads, or a separate feature? (Can we always assume it is present when using pthreads?)

@tlively
Copy link
Member Author

tlively commented Jul 12, 2019

Passive segments is a bulk memory feature, but after https://reviews.llvm.org/D64586 rolls we will be able to assume that all pthreads builds have bulk memory enabled. We will also get a nice linker error about missing features if this is somehow screwed up.

@tlively
Copy link
Member Author

tlively commented Jul 12, 2019

I also don't think this is going to work with WASM2JS+pthreads until wasm2js explicitly supports translating passive segments.

Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation, lgtm with those comments fixed.

@tlively tlively marked this pull request as ready for review July 13, 2019 01:04
@tlively
Copy link
Member Author

tlively commented Jul 13, 2019

@kripken Does the Firefox update LGTY?

ChangeLog.md Outdated

- Add support for [address sanitizer](https://clang.llvm.org/docs/AddressSanitizer.html). (#8884)
- Currently, only supports one thread without dynamic linking.
- LLVM backend pthread builds no longer use external memory initialization files
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add and depend on passive segments or such

@kripken
Copy link
Member

kripken commented Jul 14, 2019

Test failures look real now.

@tlively
Copy link
Member Author

tlively commented Jul 14, 2019

Yep 😭 will investigate tomorrow

@tlively
Copy link
Member Author

tlively commented Jul 16, 2019

@kripken failing tests are test_clientside_vertex_arrays_es3 on fastcomp and test_glgears_deriv on upstream. I'll rerun those particular jobs, but would you say this is safe to land?

@tlively tlively merged commit e8b14b4 into emscripten-core:incoming Jul 16, 2019
# we will include the mem init data in the wasm, when we don't need the
# mem init file to be loadable by itself
shared.Settings.MEM_INIT_IN_WASM = not shared.Settings.USE_PTHREADS
shared.Settings.MEM_INIT_IN_WASM = True if shared.Settings.WASM_BACKEND else not shared.Settings.USE_PTHREADS
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still confusing. I guess it will get simpler once fastcomp is gone, but why should options.memory_init_file not be the inverse of shared.Settings.MEM_INIT_IN_WASM?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great question and I don’t know the answer. @kripken did tell me it was complicated, though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to simplify this but ran into fastcomp issues with how those are used (in bad ways). it seems more efficient to defer a cleanup til after fastcomp is removed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM. This logic was confusing when I first added wasm backend support originally and I made it even worse then.

belraquib pushed a commit to belraquib/emscripten that referenced this pull request Dec 23, 2020
@tlively tlively deleted the passive-segments branch February 5, 2024 18:07
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