|
Download asm/asm-debug-stack.jsonl from winapiadmin/tinycodinglm: direct link, hf CLI and curl.
- Browser
- Download file 1.3 kB
-
https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/3c88a0fb05e4b97a2e7d2149907a657465f5d400/asm/asm-debug-stack.jsonl
- Command line
-
hf download hf://datasets/winapiadmin/tinycodinglm@3c88a0fb05e4b97a2e7d2149907a657465f5d400/asm/asm-debug-stack.jsonl
-
curl -L -o asm-debug-stack.jsonl https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/3c88a0fb05e4b97a2e7d2149907a657465f5d400/asm/asm-debug-stack.jsonl
1.3 kB
| {"type": "session", "harness": "opencode", "id": "asm-debug-stack", "name": "Debugging x86-64 Stack Corruption"} | |
| {"type": "message", "message": {"role": "system", "content": "You are an expert debugger."}} | |
| {"type": "message", "message": {"role": "user", "content": "How do I debug stack corruption in x86-64 assembly?"}} | |
| {"type": "message", "message": {"role": "assistant", "content": "Stack corruption debugging:\n\nSymptoms: SIGSEGV inside __libc_start_main (ret to bad address), canary check failure.\n\n1. Check RBP chain: 'x/2xg $rbp' should show [old_rbp][return_address]. If old_rbp not a valid stack address, frame is corrupted.\n\n2. Stack canary: add stack_chk_guard check. If you see 'stack smashing detected', buffer overflow occurred.\n\n3. GDB watchpoints: 'watch *($rbp+8)' — break when return address is modified.\n\n4. Check stack alignment: RSP must be 16-byte aligned before CALL (8-byte aligned on entry). Misalignment causes SSE faults.\n\n5. Common assembly mistakes:\n - PUSH/POP mismatch\n - SUB RSP, N in prologue but wrong ADD RSP, N in epilogue\n - Writing past local buffer\n - Forgot to save/restore callee-saved register (RBX, R12-R15).\n\n6. Manual check: set breakpoint after function prologue, step through each instruction, check RSP consistency."}} | |