Skip to main content

Questions tagged [valgrind]

Valgrind is a dynamic analysis tool for Linux, FreeBSD, macOS, Android, and Solaris systems. It can be used for execution and data profiling as well as for finding memory leaks, race conditions, and threading errors.

0 votes
1 answer
85 views

Mergesort for singly-linked lists gives correct results but leaks memory

I'm working on an assignment to implement mergesort for singly-linked lists in C++. The merge function needs to merge two sorted lists in-place without creating new nodes. The mergesort function ...
Milad Khazani's user avatar
1 vote
1 answer
62 views

Valgrind is still showing memory is reachable with addrec() [closed]

The following code is for creating and managing hash table: hash.c: #include <stdio.h> #include <stdlib.h> #include "hash.h" typedef struct node { record_t rec; struct ...
bigmacBucky's user avatar
-2 votes
0 answers
31 views

Cache thrashing

I am working, out of passion only, on a simple game engine to try ideas and implement a sample asteroids like game. The recommended way is component based, streaming data etc. for good cache coherence....
user529327's user avatar
0 votes
1 answer
91 views

How to detect Out-of-Bounds Access within Placement New Boundaries in C++?

#include <iostream> struct mix { int64_t x[10]; }; int main() { int64_t* p = new int64_t[100]; mix* px = new (p) mix; mix* py = new (p + 10) mix; px->x[12] = 104; std::cout <&...
种传龙's user avatar
0 votes
0 answers
16 views

double free or corruption (out), coredump. Where can I find the coredump?

I have been working in Fedora on a C++ client for the BaseX XML database. The original version of the client was developed in Eclipse and consisted of a test program and some source files that allowed ...
Ben Engbers's user avatar
0 votes
1 answer
28 views

Valgrind Massif - startpoint for memory allocation [cpp]

I just started getting in touch with Valgrinds massif tool and wanted to know, if one could introduce a checkpoint to start monitoring the heap allocation. Considering the following basic example: #...
Chief's user avatar
  • 181
0 votes
1 answer
25 views

--trace-children-skip option is not having any impact with Valgrind

I have a run.sh with: ./opt/exm/bin/exm_daemon exm_daemon spawns many process. I run valgrind with options: sudo valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --trace-children=...
noob-sys-dev's user avatar
1 vote
0 answers
33 views

Why is Callgrind not working on my project?

I tried using callgrind on my program written in C language but it is not working. This is the output it gives me when I try to launch it: (https://i.sstatic.net/pBeyJRYf.png) It was working before, ...
Federica Censabella's user avatar
0 votes
1 answer
56 views

Valgrind complain after modifing reference return variable from a vector in c++

I am trying to modify an std::vector through the use of references, the vector lifetime is designed in such a way modifications through the reference always are valid, in other words the the reference'...
user1006274's user avatar
0 votes
0 answers
58 views

Valgrind fatal error at startup in arch linux

I installed valgrind on my arch system through sudo pacman -S valgrind and when attempting to run it, this message appears: ==3821== Memcheck, a memory error detector ==3821== Copyright (C) 2002-2024,...
Victor fernandes's user avatar
0 votes
0 answers
24 views

Build valgrind to target LPC55S69(which is based on Armv8-m architecture)

I'm trying to build valgrind to target baremetal arm cortex-m (based on armv8-m architecture). The host is a x86 wsl environment. How do I specify this while trying to configure valgrind. For ex: To ...
randomranger409's user avatar
2 votes
1 answer
61 views

Unable to debug python C extension using valgrind

I am trying to debug a C extension I made using CFFI. I am using Python 3.11 and Valgrind 3.18.1. As far as I can tell from the docs the only setup needed is setting the PYTHONMALLOC=malloc ...
Slav's user avatar
  • 357
0 votes
1 answer
46 views

Valgrind stack measurement

I would like to clarify some points about using Valgrind soft in order to measure stack usage size. I'm using Linux OS. My main program is written on C++ and using 3-d party shared libraries(some ...
Greg's user avatar
  • 1
0 votes
1 answer
45 views

Enable/disable flags when doing a valgrind build

I have two targets in my Makefile, namely: all: $(TARGET) valgrind: $(TARGET) ... ... ... The valgrind target simply runs the executable with the valgrind program. The CFLAGS for this ...
Harith's user avatar
  • 7,235
0 votes
2 answers
45 views

Valgrind (C): Process terminating with default action of signal 11 (SIGSEGV)

I am doing a school project on AVL tree in C. And the code is presenting the following errors. It compiles nicely but it is terminating with Segmentation fault (core dumped). ==210456== Invalid read ...
Asteria101's user avatar

15 30 50 per page
1
2 3 4 5
280