glfw: undefined behavior caught by UBSan with wayland glfwGetKeyName #375

Closed
opened 2022-06-28 18:00:08 +00:00 by emidoots · 1 comment
emidoots commented 2022-06-28 18:00:08 +00:00 (Migrated from github.com)

After https://github.com/hexops/mach/pull/374 we disabled a test because:

Segmentation fault at address 0x80
???:?:?: 0x7f683544b9c4 in ??? (???)
upstream/glfw/src/input.c:713:12: 0x30a0a7 in glfwGetKeyName (/home/Zargio/Documents/Github/mach/glfw/src/sources_all.c)
    return _glfw.platform.getScancodeName(scancode);
           ^
/home/Zargio/Documents/Github/mach/glfw/src/key.zig:220:43: 0x248115 in key.test "getName" (test)
        const name_opt = cc.glfwGetKeyName(@enumToInt(self), @intCast(c_int, scancode));
After https://github.com/hexops/mach/pull/374 we disabled a test because: ``` Segmentation fault at address 0x80 ???:?:?: 0x7f683544b9c4 in ??? (???) upstream/glfw/src/input.c:713:12: 0x30a0a7 in glfwGetKeyName (/home/Zargio/Documents/Github/mach/glfw/src/sources_all.c) return _glfw.platform.getScancodeName(scancode); ^ /home/Zargio/Documents/Github/mach/glfw/src/key.zig:220:43: 0x248115 in key.test "getName" (test) const name_opt = cc.glfwGetKeyName(@enumToInt(self), @intCast(c_int, scancode)); ```
alichraghi commented 2022-09-02 13:01:57 +00:00 (Migrated from github.com)

worked as expected on Wayland and X11. can be closed now

worked as expected on Wayland and X11. can be closed now
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
hexops/mach#375
No description provided.