Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
85 views

Here is small test C program which just intentionally crashes: #include <stdio.h> #include <stdlib.h> int main(void) { char *l = getenv("LANG"); printf("LANG = %s\n&...
dee0xeed's user avatar
  • 105
1 vote
0 answers
55 views

I have a cmake C project that needs to be compiled against libc. I want to use a function (getgrouplist) that contains a bug in glibc versions prior to 2.3.3. I want to disallow compilation on ...
user18812922's user avatar
0 votes
2 answers
186 views

With help of dl_iterate_phdr I can load start address of main executable and all binaries via dlpi_addr and it is correlates to function pointers address I can print via printf, however other fields , ...
Igor B's user avatar
  • 914
0 votes
0 answers
72 views

I stupidly moved the libc.so and libc.so.6 files to my /home/ dir. I thought I could replace them with a newer version that I compiled under /home/glibc/build but, of course, I then realised that no ...
bioplanet's user avatar
0 votes
1 answer
1k views

On Ubuntu 22.04 freshly installed from Server ISO (Ubuntu 22.04.3 LTS x86_64 5.15.0-91-generic) UE5 fails to start with SIGSEGV in libc.6.so. Engine does not tell any details about function which ...
Never Man's user avatar
1 vote
0 answers
831 views

my goal is to setup an shell.nix for C and C++ cross-compiling using llvm's clang and it's corresponding libc and libc++ for static linking. With following hello.c #include <stdio.h> int main (...
cguenther's user avatar
  • 1,669
1 vote
2 answers
304 views

I have a compiled aarch64 shared library (my_custom.so) that has been successfully integrated into an APK and runs on Android devices. As it is a standalone low-level computational library without ...
Fridaynight's user avatar
1 vote
1 answer
116 views

In Linux, I am logged in as bj:bj as non root user:group. bj@pc-bj:~$ id uid=1000(bj) gid=1000(bj) groups=1000(bj),5(tty),20(dialout),24(cdrom),25(floppy),29(audio),1006(internetallowed) I want to ...
Bigjim's user avatar
  • 2,275
0 votes
0 answers
72 views

If I use printf with a high precision and print a floating point number, I get extra numbers beyond what is represented by the type. For example: const double x = 1.0 / 3.0; printf("%.50f\n",...
Valeria Suarez's user avatar
0 votes
0 answers
141 views

What is the maximum number of unix domain socket that linux can manage in parallel, besides the file descriptor limit that we can change? Some Os have a limit https://www.ibm.com/docs/en/ztpf/1.1.0.15?...
Anis's user avatar
  • 1
1 vote
0 answers
494 views

I am working with a fork of Musl libc to add to a toy operating system I am building for a project. One of the challenges is that my OS has a slightly different calling convention which has ...
Bneac's user avatar
  • 89
1 vote
1 answer
180 views

So from the explanation of malloc(0) question. I find it counterintuitive that the notion of the zero size of the allocated memory chunk when returning a not-NULL value. (concluded from here) Since, ...
tbhaxor's user avatar
  • 2,057
0 votes
1 answer
75 views

When using printf with a large precision and a double floating point number, there is rounding that occurs on non-significant digits (when the trailing 0's start). I'm wondering if there is a macro ...
Valeria Suarez's user avatar
0 votes
1 answer
6k views

Python 3.11 upgrade throws error: lib64/libc.so.6: version GLIBC_2.28' not found [ERROR] Runtime.ImportModuleError: Unable to import module 'xxxxx': /lib64/libc.so.6: version GLIBC_2.28' not found (...
Rbadiger's user avatar
0 votes
1 answer
99 views

Is that true that Go dynamic linked to libc in Linux and Mac is different? I am trying to evaluate the use of LD_PRELOAD (Linux) or DYLD_INSERT_LIBRARIES (macOS) to intercept the bind (listen) ...
user1929999's user avatar
0 votes
1 answer
211 views

We have a CI pipeline that builds a bunch of projects. One of the projects uses advanced C++ features (C++20) and so we've upgraded our gcc version to gcc-9. However, we have some target embedded ...
MB.'s user avatar
  • 1,431
0 votes
1 answer
310 views

I am working on heavily optimizing some code (thankfully no platform independence - Linux only). I created a very simple framework for measuring time passed (in clock cycles). An idea I had early was ...
CasseroleBoi's user avatar
1 vote
1 answer
168 views

I'm currently developing my NASM x64 version of GLIBC, and I'm having a problem testing it. The ASM code is first compiled in .so, next my test code (in C language) is compiled via GCC, then I load my ...
MrZigha's user avatar
  • 422
-1 votes
1 answer
370 views

Introduction In a log output of a crash, there is an error with backtrace output as: #00 pc 00038cf0 /apex/com.android.runtime/lib/bionic/libc.so (__futex_wait_ex(void volatile*, bool, int, bool, ...
Mauricio Schalch's user avatar
0 votes
0 answers
45 views

This same code when I compile it using this command: gcc chal.c -fno-pie -no-pie -fno-stack-protector -O0 -g -o chal #include <stdio.h> #include <string.h> int main() { char a[2]; ...
NobinPegasus's user avatar
2 votes
1 answer
397 views

I can't find manual pages for any of the functions declared in threads.h added in C11. There is good documentation for them in https://en.cppreference.com/w/c/11 and in the glibc docs, however I would ...
user avatar
1 vote
1 answer
161 views

My system : Ubuntu 22.04.3 running on x86_64 CPU. I have this C program in a file named test.c : int main(){ long int a = 10; long int b = 20; } I've compiled the file with "gcc test.c -...
alessio solari's user avatar
0 votes
1 answer
1k views

I am a complete beginner in C++ and trying to run my first program. #include <iostream> int main() { std::cout << "Hello world!"; return 0; } Then I run, in the ...
Shikhar's user avatar
  • 11
0 votes
1 answer
407 views

I'm running ubuntu 20.04 amd64 and trying to upgrade libc6 package on my air gapped server. I have my own apt repositories, where i store all the packages i download. I downloaded the latest version ...
dyurhhs zhru's user avatar
0 votes
0 answers
300 views

Problem I'm trying to profile a Java program which uses JNI. I'm using this as a guide. I've downloaded version 5.3.0 of jemalloc. I've done configure and make to build it (in the rockylinux:8.8 ...
karobar's user avatar
  • 1,360
3 votes
1 answer
814 views

I want to know how to force a GCC + GNU libc toolchain into normal Unicode behaviour, where the source code files encoding is UTF-8, and where the compiled program uses UTF-8 as its multibyte ...
Mike Gran's user avatar
0 votes
0 answers
102 views

i am working on a NTP v4 client, and i wanted to know how i can adjust system time accordingly. i found adjtime(3) which basically adjust's the system clock's speed by some amount thus the system ...
Aditya's user avatar
  • 1,359
1 vote
1 answer
345 views

I do not understand why the GNU Coding Standard has the following line in Section 4.2 - Writing Robust Programs Use getopt_long to decode arguments, unless the argument syntax makes this unreasonable....
Scott Christensen's user avatar
0 votes
0 answers
424 views

Im not very familliar with Docker OR with rust cross compilation maybe somebody can point out what I'm doing wrong here. The environment is not relevant but im on WSL2: ubuntu and I'm trying to ...
Petre Mugur Gherman's user avatar
0 votes
1 answer
828 views

I have been reading through info libc, and in section 2.3 "Error Reporting - Error Messages" it mentions the following two functions: -- Function: const char * strerrorname_np (int ERRNUM) |...
Scott Christensen's user avatar
3 votes
2 answers
15k views

By reading the man of strlcpy I met example: Since it is known how many characters were copied the first time, things can be sped up a bit by using a copy instead of an append: char *dir, *file, ...
Andrei's user avatar
  • 127
1 vote
2 answers
871 views

I build a c++ software module that is delivered as header files (.h) containing the API and a static library (.a) with the implementation. The module only depends on standard libraries so I want to ...
many-sigsegv's user avatar
1 vote
0 answers
374 views

For some reason I need to translate a piece of C code to Rust with c2rust and then compile it to wasm. The Rust code is as follows: extern "C" { fn printf(_: *const libc::c_char, _: ...) ...
Effy's user avatar
  • 11
2 votes
1 answer
530 views

I have a problem with the installation of OMNeT++ on Ubuntu. The error occurs during the ./configurecommand and relates to the math library: configure: error: Standard C math library -lm not found. I ...
Angelo Trotta's user avatar
2 votes
1 answer
316 views

TL;DR: Is it posixly incorrect for fflush(NULL) not to flush stdin? Consider the following code snippet, #include <stdio.h> #include <stdlib.h> #include <unistd.h> int main(void) { ...
SuibianP's user avatar
  • 128
1 vote
1 answer
235 views

When I link my executable to a libc built by myself with Crosstool-NG, the execution of my program is incomparably slower than if I link my executable with a libc built by a company called Nucleisys ...
bitmap kid's user avatar
3 votes
0 answers
446 views

This code creates 2 GiB of objects, then garbage collects them. Afterwards, the process is still using 2 GiB+ of memory. In Windows, I was able to force Windows to reclaim the memory by calling ...
BlueSky's user avatar
  • 1,549
2 votes
2 answers
2k views

I've been trying to compile against Musl for a while now. My goal is to make a game engine binary which can execute on as many x86_64 Linux distros as possible with the same binary. The problem is, ...
Alexis's user avatar
  • 101
1 vote
1 answer
54 views

I'm writing a (dotnet) program that outputs random bytes to stdout. These characters are then piped into another program that uses the libc read function. { char v4[76]; // [rsp+0h] [rbp-50h] BYREF ...
T. Webster's user avatar
  • 10.2k
-1 votes
1 answer
429 views

So I've been trying to develop a ret2libc exploit for my program as shown below: #include <stdlib.h> #include <stdio.h> void vuln() { char arr[0x10]; scanf("%s", arr); ...
bruh's user avatar
  • 1
3 votes
1 answer
1k views

My bare-metal program manually calls memset() to zero entire/aligned 4k pages like this (I'm not using uint64_t, but another 8-byte thing): uint64_t something[512] __attribute__((aligned(4096))); ...
Lance E.T. Compte's user avatar
0 votes
2 answers
438 views

I've run some sample code through perf, and get the following top hotspot: - 63.93% 0.10% bonds libc.so.6 [.] __GI___fstatat64 ...
imrichardcole's user avatar
-1 votes
1 answer
257 views

What is the meaning of the [k] symbol I can see in the following perf report output: + 63.93% 0.10% sample libc.so.6 [.] __GI___fstatat64 + 63.82% 63.82% sample [...
imrichardcole's user avatar
1 vote
0 answers
528 views

I am trying to add a Golang script to my REST API and I am facing a problem of compatibility between my Golang executable and the Docker my docker container. Let me give you some context: This is what ...
Marxian's user avatar
  • 19
1 vote
0 answers
130 views

EDIT: This may be an issue with tun library I'm using https://github.com/yaa110/async-tun/issues/2 I am learning about linux networking and trying to build a simple VPN tunnel using libp2p. The code I ...
Ben Little's user avatar
1 vote
1 answer
298 views

I'm trying to compile and execute the hello world example in: https://gnucobol.sourceforge.io/historical/open-cobol/Hello-World-.html But when I compile with: $ cobc hello.cob I get a hello.so ...
reymagnus's user avatar
  • 381
0 votes
1 answer
122 views

I noticed that in Glibc the macro "errno" got expanded to an invocation of "__errno_location". However, there are two different definitions of "__errno_location": The ...
brian's user avatar
  • 273
1 vote
0 answers
106 views

Situation Let me explain my situation: I'm running all this stuff on Android chroot with root access and SELinux disabled I have a program linked against glibc in the chroot (can't relink it, since I ...
raspiduino's user avatar
1 vote
1 answer
939 views

I try to set up a local server and during the installation I get an error lined with failing build of librockdb-sys, error below: Compiling serde_json v1.0.79 Compiling bincode v1.3.3 Compiling ...
Arek63's user avatar
  • 23
2 votes
1 answer
417 views

I am curious if asprintf is available. Some libc implementations provide it under specific Feature Test Macros. Namely if you #define _GNU_SOURCE or #define _BSD_SOURCE you can get asprintf and a few ...
Samuel Marks's user avatar
  • 1,930

1
2
3 4 5
23