Comments (6)
$rust-gdb compositor
(gdb) b wayland_server::event_loop::global_bind::{{closure}}<wayland_server::generated::server::wl_compositor::WlCompositor,rwc::CompositorGlobal>
(gdb) run
Breakpoint 1 ...
let data = &*(data as ...);
(gdb) n
let handler = data.0;
(gdb) print data[0]
$1 = {0x1, 0x3}
So the self pointer is already invalid when global_bind is called
from wayland-rs.
The data = Box::new(...)
in register_global has the same address as data in global_bind, some somewhere betwen the two something's overwriting that memory.
from wayland-rs.
Okay, this is very concerning.
Running your first code, I get this
Breakpoint 1, compositor::{{impl}}::bind (self=0xc000100000001, evqh=0x3, global=WlCompositor = {...})
Looks like I only get evqh
to be corrupted, not self
? Are your running this on wayland-server 0.9.3 ?
The second one gives me the same thing: $1 = {0xc000100000001, 0x3}
from wayland-rs.
well no, looks like when the user data is set in register_global
, the values are {0x7ffff6636000, 0x7ffff661f060}
...
from wayland-rs.
Oh well...
Hardware watchpoint 2: *0x7ffff6636010
Old value = -161259520
New value = 0
0x00007ffff7bd3bdd in wl_map_insert_at () from /usr/lib/libwayland-server.so.0
from wayland-rs.
Alright, found. When the Global
object returned by register_global
is destroyed, it frees the backing storage of the user data...
This is plainly wrong, as it's documented that you can let it go out of scope. I'll correct this.
from wayland-rs.
Related Issues (20)
- Compile wayland-rs/wayland-backend without linking to wayland-sys HOT 2
- Use `BorrowedFd` for requests/events instead of `RawFd` HOT 3
- `destroy()` Apis should be called on Drop HOT 6
- Display parsing error under flatpak HOT 2
- Implement Borrow<ObjectId> for all protocol object wrappers
- wayland-scanner as a library HOT 2
- Remove lazy_static from the dependency tree
- [Bug] compilation error with wayland-backend HOT 2
- Update wayland-scanner to use quick-xml 0.26
- Describe how wayland-rs lowers wire types to rust types
- Add wayland-backend features control to wayland-client. HOT 5
- Downgrade and upgrade of newly initialized resource has different data Arc inside
- Handle duplicated enum variants in the protocol HOT 2
- Update bitflags to 2.0
- event_created_child macro can cause downcast error if constants are not imported
- Migration guide to 0.30? HOT 1
- wayland-client: duplicate dependencies with `calloop` feature HOT 1
- Delay in rendering frame while resizing HOT 2
- Make wayland-cursor produce buffers of correct sizes
- wayland-client blocking dispatch with timeout HOT 2
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 wayland-rs.