-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing Tendril
Atomicity
with SendTendril
produces garbage.
#58
Comments
This is definitely a bug. It looks like this functionality is not tested at all, lovely. My suspicion is on This in turn was added in b39ee1f which talks about the C API. Since we removed that, we should probably remove |
Removing I’d recommend not to use Tendril if you can, though presumably you need it in order to use html5ever. I started a rewrite of Tendril at https://github.com/servo/html5ever/tree/zbuf/ with the idea of having |
This fixes #58, which shows UB when converting between non-atomic and atomic `Tendril`. This conversion is exposed without `unsafe` through `SendTendril` and implemented with `transmute`, so matching layout is essential.
Oops, didn't realize that The intent of |
But yeah, there is way too much |
This fixes #58, which shows UB when converting between non-atomic and atomic `Tendril`. This conversion is exposed without `unsafe` through `SendTendril` and implemented with `transmute`, so matching layout is essential.
Fix layout differences of Header<Atomic> v.s. Header<NonAtomic> This fixes #58, which shows UB when converting between non-atomic and atomic `Tendril`. This conversion is exposed without `unsafe` through `SendTendril` and implemented with `transmute`, so matching layout is essential.
I made these changes a long time ago and don't really remember why. Only that I wanted to use graphql over a nipper `Document` and it wasn't Sync and graphql_async wants everything to implement to implement Sync (see traits OutputType and ContainerType). In my case I don't care for Sync but it's easier to change nipper than to change async_graphql. It also helped me find a bug in the tendril library. [1] I think one change was so that if you use the :scope css selector it matches the node you are trying to match from, kind of like `querySelector()`. See developer.mozilla.org for more [2] [1] servo/tendril#58 [2] https://developer.mozilla.org/en-US/docs/Web/CSS/:scope
My understanding is that this should not modify the text of the tendril and that this is a reasonable thing to do.
But the output is something like:
It turns out the headers are different sizes so the transmute is weird.
I don't know if the
Header
should get#[repr(align(16))]
or if there's a less platform-specific thing or something; but it seems like it might be a bug idk. ¯\_(ツ)_/¯The text was updated successfully, but these errors were encountered: