Skip to main content
Filter by
Sorted by
Tagged with
2 votes
2 answers
88 views

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. ...
davidhcefx's user avatar
0 votes
1 answer
71 views

I am trying to debug a .Net memory dump taken from an Ubuntu system in WinDbg. When I try to load the dump I get the following errors: Module name Error libc.so The system ...
Steve's user avatar
  • 9,635
0 votes
1 answer
84 views

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 ...
einpoklum's user avatar
  • 137k
0 votes
1 answer
110 views

Android bionic defines a series of structs that are used specifically to handle kernel level uapi data, like sysinfo.h header which defines a struct called sysinfo that defines registers for kernel &...
user30722934's user avatar
1 vote
1 answer
62 views

I'm a full beginner in Linux. I need to program some PLC (ADAM 5630 of Advantech). It is based on the CPU TI Cortex A8 and has Linux RT 3.12 (Linux adam5630 3.12.10-rt15-ti2013.12.01; Distributor: ...
Alex Nevskiy's user avatar
1 vote
0 answers
84 views

From Linux/glibc, I have run some simple experiments to test how all char values are treated by std::tolower(int) -> int and std::tolower(char, std::locale) -> char. For my locale, I was ...
kevinarpe's user avatar
  • 21.6k
0 votes
0 answers
23 views

Using latest OS 15. Rooted via KSUN. When I open some apps it gets stuck in opening animation and the system server gets killed and a hot reboot is performed. Any fix? Here are pictures of logcat....
Itz_Broken_xd's user avatar
2 votes
1 answer
127 views

I am working on an embedded Linux system (kernel-5.10.188), where adbd is running in the target system. In the target system I created a file with echo "hello" > /data/open, then I ran ...
wangt13's user avatar
  • 1,307
0 votes
0 answers
86 views

I'm working on a project which involves using a RPi4B in order to build an open source hypervisor with two guest OS: Linux and FreeRTOS. Now all that build process is complete, and I'm trying to ...
Harsh Neelabh's user avatar
2 votes
1 answer
168 views

I'm on MacOS (Apple Silicon M4 processor, so, ARM64), and when trying to use puts from the standard C library: .global main // 1 main: ...
Silicon's user avatar
  • 39
2 votes
1 answer
864 views

Suppose I'm building a C library or app, and that my code uses libc (directly); but I'm relying on functionality or a bug fix which only became available in a certain version of glibc, or on a bug fix ...
einpoklum's user avatar
  • 137k
1 vote
2 answers
94 views

I'm working on a own libc implementation for the purpose of education. Now I want support none-ANSI characters output. For the implementation from wprintf as example I want check the underlying ...
Johannes Krottmayer's user avatar
0 votes
0 answers
163 views

On my test system, hostname --fqdn returns the Fully Qualified Domain Name (FQDN) which is foo.example.com. I need this information in several C++ apps, and I get it as: char array[DNSDOMAIN_LEN]; ...
QF0's user avatar
  • 581
0 votes
1 answer
731 views

I use sudo apt install build-essential for downloading full stack for c compiling. A almost all libs was downloaded without a problem, but several of them return 404 and not installed. Libs was <...
Alex Sindre's user avatar
4 votes
1 answer
286 views

As it is already painfully known, modifying the process environment in a multi-threaded application during runtime is asking for trouble. However, not always we can control who accesses that. In this ...
The Storm's user avatar
  • 190
0 votes
0 answers
34 views

I am trying to create my own http server without using any low-level builtin library except ctypes but things are going terribly wrong. My configuration is correct: IP address is correct, port is ...
Learn Shadow's user avatar
1 vote
2 answers
462 views

When I write code such as #include <stdio.h> int main(int argc, char** argv) { printf("Hello, world!\n"); return 0; } gcc imports stdio.h which in turn requires an associated ...
Player_X_YT's user avatar
0 votes
1 answer
76 views

I know that depending of the implementation of malloc, the algorithm used differs (free linked lists, buckets, binary buddy... - and often it is a mix). So I was wondering if it is possible to know ...
touikss's user avatar
1 vote
2 answers
131 views

To detect it, I've seen the following if condition: #include <stdio.h> #include <string.h> #include <stdlib.h> int main(){ char line[5]; while(fgets(line, 5, stdin)){ int ...
Isidro Arias's user avatar
2 votes
1 answer
175 views

So I have made two libraries with gcc and ar: libwa.a and libws.a. When I link them using -l flag in my project. I get this error: /usr/bin/ld: .../lib/libws.a(bhns.c.o): in function `atoi': bhns.c:(....
Wispy's user avatar
  • 189
1 vote
0 answers
738 views

I am on a glibc-based host system, although it has the musl libc installed. How do I force the compiler to use the musl dynamic linker, use the musl headers and link against the musl libraries? ...
nfl's user avatar
  • 75
1 vote
1 answer
92 views

Which libc/stdio functions does Perl use to open and read a file (e.g. for perl -e 'open(F,"<","test.txt");print(<F>);')? I tried running this command under strace and it ...
Vadim Kantorov's user avatar
5 votes
2 answers
155 views

Given following C code: #include <stdbool.h> int main (void) { true; return 0; } I expect that -Wunused-value would cause a warning at line 5: true; because this statement does ...
sleeptightAnsiC's user avatar
1 vote
1 answer
118 views

In libc there's an extension mechanism for implementing custom FILE* streams which allows custom open/read/seek/close callback to be attached to a custom struct. glibc's impl: https://sourceware.org/...
Vadim Kantorov's user avatar
1 vote
1 answer
1k views

I am reading this reddit reply and I came across this: To answer your question, Zig has a pretty unique and intimate relationship with libc. Zig can use libc (some Operating systems like MacOS and ...
Finlay Weber's user avatar
  • 4,303
3 votes
1 answer
109 views

When attempting to open a non-existent file on an iOS device, I observed inconsistent return values between the open function from the standard libc library and the kernel syscall (syscall number 5). ...
Bao HQ's user avatar
  • 1,194
3 votes
2 answers
136 views

Consider the following invocation of printf(): printf("%.-1f", 34.14); it specifies a negative precision value of -1. Making this call with glibc, we get: %0.-1f is this correct? If so, ...
einpoklum's user avatar
  • 137k
5 votes
1 answer
288 views

I'm trying to code up a (limited) in-memory file system redirects via libc/syscall interception and returning memfd_create-produced file descriptors for the files that are virtualized. As a ...
Vadim Kantorov's user avatar
2 votes
1 answer
532 views

Is there anyway I could compile a Rust program to a binary which does not depend on a libc for runtime and for Linux?
Farooq Karimi Zadeh's user avatar
1 vote
0 answers
157 views

I'm trying to bootstrap compile the toolchains for Vortex, which is an open source GPGPU based on RISC-V ISA. I followed the README.vortex in the pocl source file pulled from https://github.com/...
Enki Sun's user avatar
0 votes
0 answers
926 views

I need to use the C standard to compile with my POSIX implementation. I downloaded the precompiled lib of gcc-11.2, but after unzipping, I am facing libgcc.a and libc.a libraries. I tried to compile ...
Eoa's user avatar
  • 1
3 votes
1 answer
843 views

I'm moving this here from the CMake Discourse. I’m trying to set up CMake to cross compile an application that will run on an old (Debian stretch ~2017) Linux system (functioning, but slow, so I'd ...
Alessandro Bertulli's user avatar
0 votes
1 answer
185 views

Error checking in C is a task that is very verbose and makes the code unreadable. In C++ you have exceptions, but when I use C++ to call C functions, the headaches come back. I wish there was a "...
ABu's user avatar
  • 12.5k
4 votes
0 answers
96 views

POSIX Issue 7, 2018 defines the prototype of function lfind in search.h as: void *lfind(const void *, const void *, size_t *, size_t, int (*)(const void *, const void *)); Or, more ...
anol's user avatar
  • 9,400
1 vote
0 answers
2k views

I need the debug symbols for libc on Ubuntu 20.04 for performance profiling in gperftools (or perf). I checked how to install them and used: sudo apt-get install libc6-dbg After successfull ...
CodeMonkey's user avatar
  • 4,966
0 votes
1 answer
304 views

Description I'm currently trying to send packets via a raw socket in Rust. I'm currently using libc to manage the socket. I've had success with sending the packet but the packet sent is never the same ...
petios's user avatar
  • 27
0 votes
1 answer
156 views

I am currently playing with POSIX functions defined in dlfcn.h with Rust, with the goal of calling a function in a separated .so file. The project actually contains 2 crates: The binary loading the ...
Quentin's user avatar
  • 79
0 votes
2 answers
449 views

I'm building the llvm-18.1.3 and facing the all warnings being treated as errors error as follows: /home/pi/llvm-project-llvmorg-18.1.3/libc/src/stdlib/bsearch.cpp:16:28: error: ‘void* ...
Ueda Takeyuki's user avatar
0 votes
1 answer
287 views

I'd like to compile a C program with system libraries (such as libc) linked statically, with all my other custom libraries (such as openssl) linked dynamically. When I compile a "Hello World"...
Austin M's user avatar
1 vote
1 answer
294 views

I am building my own 32-bit x86 OS in which I load user programs from ELF files. When compiling the user C programs I use -nostdlib to exclude GLIBC and link my own LIBC instead. The problem is that ...
Eylon's user avatar
  • 46
0 votes
1 answer
88 views

In some previous days, I searched and asked some questions about a file different timestamps. Now I know I can get creation time by statx(2) and change only one of last (status change | modification | ...
tahzibi.jafar's user avatar
1 vote
1 answer
134 views

As I know, stat/fstat system call tell us only 3 times about a file Time of last access (st_atim field) Time of last modification (st_mtim field) Time of last status change (st_ctim) and when I run ...
tahzibi.jafar's user avatar
2 votes
0 answers
103 views

I have cloned gcc repo from (https://github.com/gcc-mirror/gcc/tree/releases/gcc-13). Configured within build directory as such: ../configure --enable-host-shared --enable-languages=jit,c++ --disable-...
Kabira  K's user avatar
  • 2,065
-1 votes
1 answer
155 views

We're using yescrypt from libc's crypt(3) function to encrypt and check credentials in our C-written application server. Sometimes the crypt(3) fails because the application gets SIGKILL from the ...
guru's user avatar
  • 303
0 votes
1 answer
152 views

Where do the man pages about libc come frome? They cannot come from glibc because they slightly differ from glibc's API. One example is the man page for mmap. It describes a flag MAP_UNINITIALIZED. ...
zomega's user avatar
  • 2,434
1 vote
2 answers
454 views

As a learning exercise, I am attempting to write a platform layer in C for Windows and GNU/Linux operating systems. I am currently interested in implementing a function which opens a file on the host ...
Oh Fiveight's user avatar
0 votes
3 answers
210 views

I have a micro controller c++ project where I declare as much as possible globally instead of newing objects. In fact, I am not using the new keyword anywhere. I now ran into the situation where the ...
bas's user avatar
  • 15.2k
2 votes
1 answer
473 views

We are building a GTK3 application targeting Ubuntu 18.04 LTS and all the later releases. But when we build an application in Ubuntu version 20.04, that application can't run on the older Ubuntu ...
Harshith's user avatar
  • 320
3 votes
1 answer
659 views

Recently I tried to build a complex C++ application. App was built. But when I tried to launch it it crashed with illegal memory access. Actually it was null pointer with offset. I started to ...
Anton Astafiev's user avatar
0 votes
0 answers
74 views

Is there a way (API) to get list of nameservers on Linux except of well known res_(n)init? options: use of .nscount and .nsaddr_list[] after res_(n)init() call parsing resolv.conf on your own ??? ...
yvs2014's user avatar
  • 372

1
2 3 4 5
23