2,410 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
-3
votes
3
answers
59
views
glibc startup code appears to overwrite stack variable when debugging with GDB [closed]
Description
While debugging a small C program on Linux with GDB, I noticed that a local variable in main appears to contain ELF header bytes right at function entry:
s = 0x7ffff7fc1000 "177円ELF\...
1
vote
1
answer
98
views
glibc startup code appears to overwrite stack variable when debugging with GDB + ASAN
I am debugging a C program on Linux (x86_64) using GDB and AddressSanitizer. I have a stack variable:
struct file_ctx ctx;
memset(&ctx, 0, sizeof ctx);
I set a hardware watchpoint on the ...
1
vote
1
answer
87
views
GCC 14.2.0 Coverage (.gcda files) Not Generated at Runtime After Upgrade from GCC 8.5.0 + glibc 2.23
I have created a cflow build and when loading the image in the system, I could see only fewer number of gcda files.
After upgrading from GCC 8.5.0 to GCC 14.2.0, runtime code coverage (.gcda file ...
4
votes
1
answer
155
views
Is `__cxa_finalize` ever called with a null pointer in practice?
A C++ program built with GCC usually calls __cxa_finalize for each shared library in reverse order of initialization, for example at program exit, to destroy global variables and function-local ...
dyp's user avatar
- 39.5k
0
votes
1
answer
82
views
Unfreeable Memory when Using Capstone
I disassembled a 7,838,304-Byte portion of /usr/lib/x86_64-linux-gnu/dri/i965_dri.so using Capstone as shown below:
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#...
0
votes
0
answers
41
views
Monitor sigprocmask calls with Syscall User Dispatch?
I'm using prctl(PR_SET_SYSCALL_USER_DISPATCH, ...) to enable Syscall User Dispatch with a SIGSYS handler that gets called when the application issues any syscall. The prctl() call also marks the code ...
1
vote
0
answers
111
views
std::shared_mutex priority inversion
pthread_rwlock_wrlock are used inside real-time threads to cause hang to live, Why would you live?
There is a priority inversion bug described here involving pthread_rwlock_wrlock and real time ...
0
votes
2
answers
93
views
How to reliably map glibc dynamic symbols (e.g., open@glibc) to kernel syscalls (e.g., openat)?
I am trying to build a mapping between the dynamic symbols in ELF files (from glibc) and the actual kernel syscalls they invoke.
My environment is x86_64 Ubuntu 22.04.
What I've Tried
Parsing man 2 ...
0
votes
1
answer
56
views
Where Can I See the Mapping Flow Between .dynsym and Kernel System Calls?
I'm struggling to reconcile the difference between the symbols listed in my ELF file's dynamic symbol table (.dynsym) and the system calls observed via strace.
When I perform static analysis using ...
0
votes
1
answer
97
views
Returning memory from glibc malloc non-main arenas to the operating system
I simulated a scenario in Java that leads to severe glibc memory fragmentation.
Step one: simulate a multithreaded environment with 600 threads.
Step two: every second, start two new threads that ...
2
votes
2
answers
92
views
mallopt(M_PERTURB) does not perturb the memory on free
I am trying to catch memory-related bugs such as use-after-free by mallopt(M_PERTURB, <value>).
According to the doc, the memory will be initialized to value when it has been released by free.
...
3
votes
0
answers
150
views
Cross-compiling GLIBC for ARM
I am tying to cross-compile GLIBC_2.36 from source for ARM. I am using arm-linux-gnueabihf toolchain to do this. The command I am passing from my build directory is below:
../glibc-2.36/configure --...
2
votes
2
answers
227
views
Why GDB is unable to break on main()?
I am launching my a.out application manually by passing it as an argument to dynamic loader like below. My application is compiled in debug mode.
*gdb --args /lib64/ld-linux-x86-64.so.2 ./a.out
I am ...
0
votes
1
answer
98
views
Getting a 32-bit program to run on a 64-bit distro without distribution-installed 32-bit libc [closed]
I'm trying to run an executable compiled for 32-bit Linux, on two machines running 64-bit Linux.
On one machine, the 32-bit version of glibc, and perhaps some related facilities, are installed as a ...
-1
votes
1
answer
205
views
These critical programs are missing or too old: "GNU ld compiler" when building glibc 2.42
I'm trying to build glibc 2.42 on a SLES 15 SP 6 machine (yeah, sorry about that, not my choice).
When configuring glibc, I am told:
These critical programs are missing or too old: "GNU ld ...