-The error appeared than I typed: valgrind asan locate -And I got the message: valgrind: m_commandline.c:79 (read_dot_valgrindrc): Assertion 'n >= 0 && n <= stat_buf.size+1' failed. -After this error appears each time I try to use valgrind with or without any keys or arguments. Package reinstall didn't solve the problem. -Also I tried to install valgrind-3.11.0. Trying to use valgrind I recieve the message: valgrind: m_commandline.c:79 (read_dot_valgrindrc): Assertion 'n >= 0 && n <= stat_buf.size+1' failed. - uname -a: Linux nick-virtual-machine 3.16.0-38-generic #52~14.04.1-Ubuntu SMP Fri May 8 09:43:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
-Attention! -The version of valgrind is 3.10.1 and full message was: valgrind: m_commandline.c:77 (read_dot_valgrindrc): Assertion 'n >= 0 && n <= stat_buf.size+1' failed. host stacktrace: ==10093== at 0x3805DB16: ??? (in /usr/lib/valgrind/memcheck-amd64-linux) sched status: running_tid=0 Note: see also the FAQ in the source distribution. It contains workarounds to several common problems. In particular, if Valgrind aborted or crashed after identifying problems in your program, there's a good chance that fixing those problems will prevent Valgrind aborting or crashing, especially if it happened in m_mallocfree.c. If that doesn't help, please report this bug to: www.valgrind.org In the bug report, send all the above text, the valgrind version, and what OS and version you are using. Thanks. -For the 3.11.0 message was one line, represented in first report.
This doesn't really make any sense - it appears that read() has returned more bytes than stat() says exist in the file! How big is your .valgrindrc file? Can you strace valgrind and attach the trace?
Created attachment 98581 [details] strace valgrind report
Created attachment 98582 [details] strace without sortby
Size of ./.valgrindrc is 4,0K
Well 4K seems extremely large, but it seems the real problem is that your .valgrindrc is a directory: read(3, 0x802001230, 4096) = -1 EISDIR (Is a directory) It is supposed to be a file...
Ok. It seems like this is neither directory as cd doesn't see it nor regular file as mcedit can't open it (with error "it's not a regular file"). After deletion of valgrind, the folder still exists. I tried to move it and install the package again. Caught the same message. !Found some strange solution: I renamed this thing just as valgrind and moved to /home, also restarted system (needed as terminal couldn't find the command valgrind). Now, it works. Also I can open the moved folder and it is empty. The question is should I delete it or keep on disk, as I couldn't find the .valgrindrc file?
Well it's a bug that valgrind crashes when .valgrindrc is a folder, but the easy workaround is for you to remove that folder (it serves no purpose - firstly because .valgrindrc is optional and secondly because it should be a file). If you can't delete it then it suggests you have filesystem corruption and you should probably fsck your filesystem. The .valgrindrc is nothing to do with valgrind itself, so removing valgrind was neither necessary not appropriate really. The .valgrindrc file is just somewhere where you can put configuration options to be applied by default whenever you run valgrind. It's not owned by your system's valgrind package (or at least it shouldn't be...) but rather is something you would normally create yourself.
Ok, thanks for help and explanation. I deleted it without any problem . Can I ask you some question about usage of valgrind (everything crached as I was trying to find how to use valgrind to check my programme)?
Please use the mailing lists for general questions - it's not really appropriate for the bug tracker. See http://valgrind.org/support/mailing_lists.html for more information.
Ok. Thank you.
Created attachment 105438 [details] proposed patch
(In reply to Ivo Raisr from comment #12) > Created attachment 105438 [details] > proposed patch Looks OK to me.
Committed in Valgrind SVN as r16364.
Follow up commit SVN r16366.