All Questions
75 questions
1
vote
1
answer
79
views
C Program runs but GDB fails before main. Using GSL
I am writing a C program that loads two tables as matrices to perform operations on using the open-source GSL library. When compiled, the program prompts for the two files needed and enters an ...
1
vote
1
answer
229
views
Incorrect joint work of Valgrind with GDB
I'm trying to connect Valgrind to GDB.
I've written a test code:
#include <stdio.h>
int main()
{
int x, i;
for (i=0; i < 10; i++) {
if (x < 10)
printf("...
3
votes
2
answers
884
views
Valgrind: The Impossible Happened IA-64 cached detected
I ran valgrind on a c program and got the following error:
valgrind: the 'impossible' happened:
IA-64 cache detected?!
valgrind: m_threadstate.c:100 (vgPlain_get_ThreadState): Assertion 'tid >= ...
-3
votes
1
answer
146
views
Valgrind ==16958== invalid write of size 4 [closed]
[valgrind message]
==16958== 1 errors in context 1 of 2:
==16958== Invalid read of size 4
==16958== at 0x109637: arr_del (in /home/students/s/smelov.vp/lab3/lab3)
==16958== by 0x10939D: main (in ...
0
votes
1
answer
561
views
Finding and debugging a memory leak without Valgrind
We have a program, that using IPC waits until it receives a message.
When the program receives a message, it process it, calls some stored procedures in a database and then returns an answer.
One of ...
0
votes
0
answers
354
views
How to detect if the current process is running under Valgrind with vgdb / gdbserver
I have some error handling code that uses ptrace detection like How to detect if the current process is being run by GDB?
Valgrind does not use ptrace, so debuggerIsAttached() returns false even if ...
2
votes
1
answer
282
views
Effects of replacing stripped libraries with unstripped libraries in /usr/lib and /lib path in linux for running valgrind
I have below libs in /usr/lib path(stripped) which needs to be replaced with unstripped types.
/usr/lib/libdbus-1.so.3.14.7
/usr/lib/liblog4c.so.3.3.0
/usr/lib/libnetsnmp.so.40.0.0
/lib/ld-2.24.so
As ...
0
votes
1
answer
323
views
pipe write and read error in c: program freeze up
I am running the c code with multiprocessing by fork, and use the pipe to make child processes communicate with the parent process.
But when running the write part, let's say 3 out of 13 processes ...
1
vote
0
answers
52
views
C code works in VS, but fails when going through valgrind and refuses to compile
I have written the following code for a school assignment (C basics)
#include "source.h"
#include <ctype.h>
#include <string.h>
char *my_toupper(char *dest, const char *src)
{
...
1
vote
1
answer
157
views
Valgrind: Conditional jump or move depends on uninitialised value / Uninitialised value was created by a stack allocation
Trying to debug my C program with valgrind and for some reason it doesn't/can't tell me where the problem is and I have no idea what /dev/ttys00 is.
==25773== at 0x7FFF2037495F: ??? (in /dev/...
0
votes
0
answers
742
views
Why does Valgrind give me so many errors?
I'm kind of new to programming and I was writing a program to recover JPEG files present in "card.raw" by comparing the 4 continuous bytes. If they demarcated a JPEG the program had to copy ...
3
votes
1
answer
674
views
How do you use Valgrind/Helgrind on macOS?
I'm learning C on a macOS machine, and having lots of issues with getting Valgrind to work, particularly with threading and Helgrind. It doesn't look like there's any support for this, which makes me ...
-1
votes
1
answer
675
views
Valgrind: Conditional jump depends on uninitialised value(s) created by a stack allocation
When debugin my code, I'm getting a series of strange errors in Valgrind. The errors are all of the same type: "Conditional jump or move depends on uninitialised value(s) at ... Uninitialised ...
0
votes
2
answers
648
views
How can i interpret this error, heap summary, unitilized variables?
#include <bits/stdc++.h>
int main(){
int a, b = 10, r;
printf("%d\n", a);
}
==13235== Memcheck, a memory error detector
==13235== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward ...
3
votes
1
answer
2k
views
Is it possible to use executables having no debug symbols with valgrind?
I have been trying to debug a piece of code using valgrind and gdb.
#include <stdio.h>
#include <stdlib.h>
int main()
{
int *p = malloc(sizeof(int));
...