Skip to content

Debug address sanitizer double free

Trying to debug an asan (address sanitizer) double free memory issue. I got this stack: Might be some global object or something, cannot figure out a way under debugger to detect the instance. Setting a breakpoint on __asan::ReportGenericError does not help. Answer Looking in the stack it can be seen that the…

Bash script – Loop through directory with regex

I’m sure this must be possible, but I’m not sure how. What I’m trying to do is loop through a directory, looking for numeric directories within, and get their disk space. This is what I’ve come up with, but it’s not dealing with the regex. In case it’s not clear, I have a d…

Difference between two files containing file names

I have two files, audit.txt and server.txt, both contain filenames. I want to get only filenames that are present in audit.txt but not in server.txt ideally i would want the difference in a 3rd file missing.txt that will contain filename3 as per the example above. I have tried following but the missing.txt do…

Using git diff to replicate changes in another directory

I have multiple websites structured (simplified) as follows under a single GIT repository: I did some amendments in /site-1/index.js, /site-1/package.json and added a file /site-1/changes.md. The changes were done in 2 separate git commit in a feature branch called feature/carousel. I want to apply the same c…

Failed to open /dev/mem: Permission denied

Today, I tried to use this command on my raspberry Pi: But I got this error message : I’ve tried to place “sudo” before the command but I got the same error. How can I resolve this please ? (and sorry if I did a mistake, I started playing with my raspberry today and this is also my first que…