You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
(58) |
Apr
(261) |
May
(169) |
Jun
(214) |
Jul
(201) |
Aug
(219) |
Sep
(198) |
Oct
(203) |
Nov
(241) |
Dec
(94) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(137) |
Feb
(149) |
Mar
(150) |
Apr
(193) |
May
(95) |
Jun
(173) |
Jul
(137) |
Aug
(236) |
Sep
(157) |
Oct
(150) |
Nov
(136) |
Dec
(90) |
2005 |
Jan
(139) |
Feb
(130) |
Mar
(274) |
Apr
(138) |
May
(184) |
Jun
(152) |
Jul
(261) |
Aug
(409) |
Sep
(239) |
Oct
(241) |
Nov
(260) |
Dec
(137) |
2006 |
Jan
(191) |
Feb
(142) |
Mar
(169) |
Apr
(75) |
May
(141) |
Jun
(169) |
Jul
(131) |
Aug
(141) |
Sep
(192) |
Oct
(176) |
Nov
(142) |
Dec
(95) |
2007 |
Jan
(98) |
Feb
(120) |
Mar
(93) |
Apr
(96) |
May
(95) |
Jun
(65) |
Jul
(62) |
Aug
(56) |
Sep
(53) |
Oct
(95) |
Nov
(106) |
Dec
(87) |
2008 |
Jan
(58) |
Feb
(149) |
Mar
(175) |
Apr
(110) |
May
(106) |
Jun
(72) |
Jul
(55) |
Aug
(89) |
Sep
(26) |
Oct
(96) |
Nov
(83) |
Dec
(93) |
2009 |
Jan
(97) |
Feb
(106) |
Mar
(74) |
Apr
(64) |
May
(115) |
Jun
(83) |
Jul
(137) |
Aug
(103) |
Sep
(56) |
Oct
(59) |
Nov
(61) |
Dec
(37) |
2010 |
Jan
(94) |
Feb
(71) |
Mar
(53) |
Apr
(105) |
May
(79) |
Jun
(111) |
Jul
(110) |
Aug
(81) |
Sep
(50) |
Oct
(82) |
Nov
(49) |
Dec
(21) |
2011 |
Jan
(87) |
Feb
(105) |
Mar
(108) |
Apr
(99) |
May
(91) |
Jun
(94) |
Jul
(114) |
Aug
(77) |
Sep
(58) |
Oct
(58) |
Nov
(131) |
Dec
(62) |
2012 |
Jan
(76) |
Feb
(93) |
Mar
(68) |
Apr
(95) |
May
(62) |
Jun
(109) |
Jul
(90) |
Aug
(87) |
Sep
(49) |
Oct
(54) |
Nov
(66) |
Dec
(84) |
2013 |
Jan
(67) |
Feb
(52) |
Mar
(93) |
Apr
(65) |
May
(33) |
Jun
(34) |
Jul
(52) |
Aug
(42) |
Sep
(52) |
Oct
(48) |
Nov
(66) |
Dec
(14) |
2014 |
Jan
(66) |
Feb
(51) |
Mar
(34) |
Apr
(47) |
May
(58) |
Jun
(27) |
Jul
(52) |
Aug
(41) |
Sep
(78) |
Oct
(30) |
Nov
(28) |
Dec
(26) |
2015 |
Jan
(41) |
Feb
(42) |
Mar
(20) |
Apr
(73) |
May
(31) |
Jun
(48) |
Jul
(23) |
Aug
(55) |
Sep
(36) |
Oct
(47) |
Nov
(48) |
Dec
(41) |
2016 |
Jan
(32) |
Feb
(34) |
Mar
(33) |
Apr
(22) |
May
(14) |
Jun
(31) |
Jul
(29) |
Aug
(41) |
Sep
(17) |
Oct
(27) |
Nov
(38) |
Dec
(28) |
2017 |
Jan
(28) |
Feb
(30) |
Mar
(16) |
Apr
(9) |
May
(27) |
Jun
(57) |
Jul
(28) |
Aug
(43) |
Sep
(31) |
Oct
(20) |
Nov
(24) |
Dec
(18) |
2018 |
Jan
(34) |
Feb
(50) |
Mar
(18) |
Apr
(26) |
May
(13) |
Jun
(31) |
Jul
(13) |
Aug
(11) |
Sep
(15) |
Oct
(12) |
Nov
(18) |
Dec
(13) |
2019 |
Jan
(12) |
Feb
(29) |
Mar
(51) |
Apr
(22) |
May
(13) |
Jun
(20) |
Jul
(13) |
Aug
(12) |
Sep
(21) |
Oct
(6) |
Nov
(9) |
Dec
(5) |
2020 |
Jan
(13) |
Feb
(5) |
Mar
(25) |
Apr
(4) |
May
(40) |
Jun
(27) |
Jul
(5) |
Aug
(17) |
Sep
(21) |
Oct
(1) |
Nov
(5) |
Dec
(15) |
2021 |
Jan
(28) |
Feb
(6) |
Mar
(11) |
Apr
(5) |
May
(7) |
Jun
(8) |
Jul
(5) |
Aug
(5) |
Sep
(11) |
Oct
(9) |
Nov
(10) |
Dec
(12) |
2022 |
Jan
(7) |
Feb
(13) |
Mar
(8) |
Apr
(7) |
May
(12) |
Jun
(27) |
Jul
(14) |
Aug
(27) |
Sep
(27) |
Oct
(17) |
Nov
(17) |
Dec
|
2023 |
Jan
(10) |
Feb
(18) |
Mar
(9) |
Apr
(26) |
May
|
Jun
(13) |
Jul
(18) |
Aug
(5) |
Sep
(12) |
Oct
(16) |
Nov
(1) |
Dec
|
2024 |
Jan
(4) |
Feb
(3) |
Mar
(6) |
Apr
(17) |
May
(2) |
Jun
(33) |
Jul
(13) |
Aug
(1) |
Sep
(6) |
Oct
(8) |
Nov
(6) |
Dec
(15) |
2025 |
Jan
(5) |
Feb
(11) |
Mar
(8) |
Apr
(20) |
May
(1) |
Jun
|
Jul
|
Aug
(9) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: shuai xi <aha...@gm...> - 2018-07-30 04:13:55
|
Hello developers: I want to write a tool for valgrind base on memcheck. I use the '_WRAP_ macros' to wrap malloc in libc, but there show me an error: valgrind: m_redir.c:638 (vgPlain_redir_notify_new_DebugInfo): Assertion 'is_plausible_guest_addr(sym_avmas.main)' failed. Segmentation fault (core dumped) The code i add to 'mc_main.c' is: long I_WRAP_SONAME_FNNAME_ZU(libcZdsoZd6,malloc) ( long n ) { char * r; OrigFn fn; VALGRIND_GET_ORIG_FN(fn); CALL_FN_W_W(r, fn, n); //cloak_malloc_addr = r; return r; } (I has already disable the malloc replacement by deleting vgpreload_memcheck-amd64-linux.so.) Thanks |
From: shuai xi <aha...@gm...> - 2018-07-23 04:54:14
|
hello developers, sorry to ask this question again. When i delete the 'VG_(needs_malloc_replacement) (MC_(malloc).....)' , valgrind show me the error :'--7969-- VG_USERREQ__CLIENT_CALL1: func=0x0'. It seems that the replace system is still working,but don't know which address to call. so, what should i do to invalidate the malloc replacement ? plz. cloak |
From: shuai xi <aha...@gm...> - 2018-07-15 12:03:48
|
hello developers, I want to reuse the shadow memory part of memcheck , but do not want to use the malloc hook part. When I set the 'VG_(needs).malloc_replacement = False',the malloc hook part seems still to be working. Which code do I need to modify to make malloc replace invalid? |
From: Tom H. <to...@co...> - 2018-07-12 12:09:19
|
Yes because printf will invoke malloc which will call your wrapper which will call printf etc etc until the stack is exhausted. You can't use anything in your wrapper that might use malloc. Tom On 12/07/18 13:07, shuai xi wrote: > thank you for your answer. > But when i use  _WRAP_ macros like following code, it gives me an error. > *code:* > long I_WRAP_SONAME_FNNAME_ZU(libcZdsoZd6,malloc) ( long n ) > { >   char * r; >   OrigFn fn; >   printf("11111\n"); >   VALGRIND_GET_ORIG_FN(fn); >   CALL_FN_W_W(r, fn, n); >   //printf("in wrapper1-post: fact(%d) = %x\n", n, r); >   return r; > } > > /* --------------- */ > > int main ( void ) > { >   char * r , *x, *y; >   //printf("computing fact(5)\n"); >   //r = fact(5); >   r = malloc(0x20); >   x = malloc(0x20); >   printf("malloc(0x20) = %x \n",r ); >   printf("malloc(0x20) = %x \n",x ); >   >   return 0; > } > *error:* > ==14498== Stack overflow in thread #1: can't grow stack to 0xfe04d000 > ==14498== > ==14498== Process terminating with default action of signal 11 (SIGSEGV) > ==14498== Access not within mapped region at address 0xFE04DFFC > ==14498== Stack overflow in thread #1: can't grow stack to 0xfe04d000 > ==14498==  at 0x40B1183: _IO_doallocbuf (genops.c:394) > ==14498== If you believe this happened as a result of a stack > ==14498== overflow in your program's main thread (unlikely but > ==14498== possible), you can try to increase the size of the > ==14498== main thread stack using the --main-stacksize= flag. > ==14498== The main thread stack size used in this run was 8388608. > > But when i comment out the ' printf("11111\n"); ', It seems ok..... > > On Thu, Jul 12, 2018 at 7:24 PM Tom Hughes <to...@co... > <mailto:to...@co...>> wrote: > > On 12/07/18 10:26, shuai xi wrote: > > > I know that 'Memcheck's implementation of malloc has "nothing to do" > > with glibc's implementation' after readind some code of valgrind, > but i > > want to use the glibc's malloc to avoid changing heap layout. > > Memcheck sets the VG_(needs_malloc_replacement) to hook malloc > and exec > > MC_(malloc) instead of real malloc. It's very convenient. So can i > > get the address of the original malloc in MC_(malloc) and exec it? > > if not,can i use I_WRAP_SONAME_FNNAME_ZU function to hook malloc > in my > > valgrind tool's code? > > Yes if you want to wrap the function rather than replacing it > then use the _WRAP_ macros and then your wrapper can get the > original address and call it. > > Tom > > -- > Tom Hughes (to...@co... <mailto:to...@co...>) > http://compton.nu/ > -- Tom Hughes (to...@co...) http://compton.nu/ |
From: shuai xi <aha...@gm...> - 2018-07-12 12:07:21
|
thank you for your answer. But when i use _WRAP_ macros like following code, it gives me an error. *code:* long I_WRAP_SONAME_FNNAME_ZU(libcZdsoZd6,malloc) ( long n ) { char * r; OrigFn fn; printf("11111\n"); VALGRIND_GET_ORIG_FN(fn); CALL_FN_W_W(r, fn, n); //printf("in wrapper1-post: fact(%d) = %x\n", n, r); return r; } /* --------------- */ int main ( void ) { char * r , *x, *y; //printf("computing fact(5)\n"); //r = fact(5); r = malloc(0x20); x = malloc(0x20); printf("malloc(0x20) = %x \n",r ); printf("malloc(0x20) = %x \n",x ); return 0; } * error:* ==14498== Stack overflow in thread #1: can't grow stack to 0xfe04d000 ==14498== ==14498== Process terminating with default action of signal 11 (SIGSEGV) ==14498== Access not within mapped region at address 0xFE04DFFC ==14498== Stack overflow in thread #1: can't grow stack to 0xfe04d000 ==14498== at 0x40B1183: _IO_doallocbuf (genops.c:394) ==14498== If you believe this happened as a result of a stack ==14498== overflow in your program's main thread (unlikely but ==14498== possible), you can try to increase the size of the ==14498== main thread stack using the --main-stacksize= flag. ==14498== The main thread stack size used in this run was 8388608. But when i comment out the ' printf("11111\n"); ', It seems ok..... On Thu, Jul 12, 2018 at 7:24 PM Tom Hughes <to...@co...> wrote: > On 12/07/18 10:26, shuai xi wrote: > > > I know that 'Memcheck's implementation of malloc has "nothing to do" > > with glibc's implementation' after readind some code of valgrind, but i > > want to use the glibc's malloc to avoid changing heap layout. > > Memcheck sets the VG_(needs_malloc_replacement) to hook malloc and exec > > MC_(malloc) instead of real malloc. It's very convenient. So can i > > get the address of the original malloc in MC_(malloc) and exec it? > > if not,can i use I_WRAP_SONAME_FNNAME_ZU function to hook malloc in my > > valgrind tool's code? > > Yes if you want to wrap the function rather than replacing it > then use the _WRAP_ macros and then your wrapper can get the > original address and call it. > > Tom > > -- > Tom Hughes (to...@co...) > http://compton.nu/ > |
From: Tom H. <to...@co...> - 2018-07-12 11:24:22
|
On 12/07/18 10:26, shuai xi wrote: > I know that 'Memcheck's implementation of malloc has "nothing to do" > with glibc's implementation' after readind some code of valgrind, but i > want to use the glibc's malloc to avoid changing heap layout. > Memcheck sets the VG_(needs_malloc_replacement) to hook malloc and exec > MC_(malloc) instead of real malloc. It's very convenient. So can i > get the address of the original malloc in MC_(malloc) and exec it? > if not,can i use I_WRAP_SONAME_FNNAME_ZU function to hook malloc in my > valgrind tool's code? Yes if you want to wrap the function rather than replacing it then use the _WRAP_ macros and then your wrapper can get the original address and call it. Tom -- Tom Hughes (to...@co...) http://compton.nu/ |
From: shuai xi <aha...@gm...> - 2018-07-12 09:27:15
|
hello developer, i want to write a tool for valgrind to analysis an program automatically. I know that 'Memcheck's implementation of malloc has "nothing to do" with glibc's implementation' after readind some code of valgrind, but i want to use the glibc's malloc to avoid changing heap layout. Memcheck sets the VG_(needs_malloc_replacement) to hook malloc and exec MC_(malloc) instead of real malloc. It's very convenient. So can i get the address of the original malloc in MC_(malloc) and exec it? if not,can i use I_WRAP_SONAME_FNNAME_ZU function to hook malloc in my valgrind tool's code? thanks. |
From: Kumara, A. <as...@ls...> - 2018-07-02 04:38:14
|
Thanks for the response. This seems a good idea. Do you know if I can get the output file name from valgrind programmatically (want to write a common pre-loaded lib which is independent of running process context) ? One way might be to submit a "psu" command and process the output, are there better ways ? -----Original Message----- From: John Reiser [mailto:jr...@bi...] Sent: Monday, July 02, 2018 9:52 AM To: val...@li... Subject: Re: [Valgrind-users] Iterate over leaked memory progamatically > Is it possible to do below with valgrind (e.g. using client requests) > programmatically > > -Iterate over all leaked blocks > > -Get the stack trace and leaked memory address > > I know above can be done with the combination of gdb and vgdb, I want to know if this can be done in source code itself. The program can find, read, and process valgrind's .xml output, although of course this is another "back door" method. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Valgrind-users mailing list Val...@li... https://lists.sourceforge.net/lists/listinfo/valgrind-users Please read these warnings and restrictions: This e-mail transmission is strictly confidential and intended solely for the ordinary user of the e-mail address to which it was addressed. It may contain legally privileged and/or CONFIDENTIAL information. The unauthorised use, disclosure, distribution and/or copying of this e-mail or any information it contains is prohibited and could, in certain circumstances, constitute a criminal offence. If you have received this e-mail in error or are not an intended recipient please inform London Stock Exchange Group (“LSEG”) immediately by return e-mail or telephone 020 7797 1000. LSEG may collect, process and retain your personal information for its business purposes. For more information please see our Privacy Policy. We advise that in keeping with good computing practice the recipient of this e-mail should ensure that it is virus free. We do not accept responsibility for any virus that may be transferred by way of this e-mail. E-mail may be susceptible to data corruption, interception and unauthorised amendment, and we do not accept liability for any such corruption, interception or amendment or any consequences thereof. Calls to London Stock Exchange Group may be recorded to enable LSEG to carry out its regulatory responsibilities. London Stock Exchange Group plc 10 Paternoster Square London EC4M 7LS Registered in England and Wales No 05369106 |
From: John R. <jr...@bi...> - 2018-07-02 04:22:08
|
> Is it possible to do below with valgrind (e.g. using client requests) programmatically > > -Iterate over all leaked blocks > > -Get the stack trace and leaked memory address > > I know above can be done with the combination of gdb and vgdb, I want to know if this can be done in source code itself. The program can find, read, and process valgrind's .xml output, although of course this is another "back door" method. |
From: Kumara, A. <as...@ls...> - 2018-07-02 03:58:48
|
Hi, Is it possible to do below with valgrind (e.g. using client requests) programmatically - Iterate over all leaked blocks - Get the stack trace and leaked memory address I know above can be done with the combination of gdb and vgdb, I want to know if this can be done in source code itself. Please read these warnings and restrictions: This e-mail transmission is strictly confidential and intended solely for the ordinary user of the e-mail address to which it was addressed. It may contain legally privileged and/or CONFIDENTIAL information. The unauthorised use, disclosure, distribution and/or copying of this e-mail or any information it contains is prohibited and could, in certain circumstances, constitute a criminal offence. If you have received this e-mail in error or are not an intended recipient please inform London Stock Exchange Group (“LSEG”) immediately by return e-mail or telephone 020 7797 1000. LSEG may collect, process and retain your personal information for its business purposes. For more information please see our Privacy Policy. We advise that in keeping with good computing practice the recipient of this e-mail should ensure that it is virus free. We do not accept responsibility for any virus that may be transferred by way of this e-mail. E-mail may be susceptible to data corruption, interception and unauthorised amendment, and we do not accept liability for any such corruption, interception or amendment or any consequences thereof. Calls to London Stock Exchange Group may be recorded to enable LSEG to carry out its regulatory responsibilities. London Stock Exchange Group plc 10 Paternoster Square London EC4M 7LS Registered in England and Wales No 05369106 |
From: John R. <jr...@bi...> - 2018-07-02 03:29:56
|
>> https://bugs.kde.org/show_bug.cgi?id=396001 >> unhandled instruction: 0xEC51 0x0F1E; ARMv7 libcrypto 'mrrc' > > Thanks. Looks like the bug needs to be fixed before I can use valgrind successfully with libcrypto being loaded on my arm system. That bug now is marked as a duplicate of the earlier bug https://bugs.kde.org/show_bug.cgi?id=344802 which has an updated patch for running valgrind native on arm32 and arm64. |
From: Remus C. <rem...@gm...> - 2018-07-01 14:23:40
|
I had created the bug report: https://bugs.kde.org/show_bug.cgi?id=396053. And the code repository is in: https://github.com/hnes/libaco/tree/valgrind_memcheck_bug_report_on_copy_stack_coroutine . All best Remus On Mon, Jun 25, 2018 at 11:57 AM, Remus Clearwater < rem...@gm...> wrote: > Thank you very much, John. > > It is my fault. I will prepare the test cases and submit the detailed > report as soon as possible. > > All best > > Remus > > On Mon, Jun 25, 2018 at 11:36 AM, John Reiser <jr...@bi...> > wrote: > >> On 06/23/2018, Remus Clearwater wrote: >> >> I tried to use valgrind's memcheck on a C copy-stack coroutine program, >>> and got many false positive reports about the invalid write/read on the >>> shared stack when memcpy occurred. >>> >>> (I already used the VALGRIND_STACK_REGISTER/VALGRIND_STACK_DEREGISTER.) >>> >>> Valgrind works fine when I use valgrind on a standalone stack coroutine >>> program. >>> >>> So, the question is: >>> >>> Does valgrind support copy-stack coroutine yet? >>> >> >> The errors that you saw when you tried it, say that valgrind does not yet >> support it. >> By the way, which version of valgrind? Which hardware? Which >> compiler(s)? >> Which C run-time library? And what was the exact text of the first >> relevant >> complaint from memcheck? >> >> The surest way to make progress is to submit a New bug report at >> https://bugs.kde.org/buglist.cgi?quicksearch=valgrind >> and attach two test cases with actual code: one with "standalone stack >> co-routine", >> and one with "copy-stack co-routine". Supplying actual code, and the >> recipe >> to build executables from it, is vital. If the behavior that you saw >> cannot be reproduced by a valgrind developer, then it is likely to be >> a long time before anything gets fixed. >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Valgrind-users mailing list >> Val...@li... >> https://lists.sourceforge.net/lists/listinfo/valgrind-users >> > > |
From: John R. <jr...@bi...> - 2018-06-30 05:17:13
|
>> To make progress in the meantime, replace those 32 bits by the two instructions >> mov r0,#0 >> mov r1,#0 >> which clear general registers r0 and r1. This is a guess that zeroes >> mean "this CPU has no such hardware assist". The libcrypto software >> will choose slower but equivalent code, instead of using >> any special hardware assist. > How do I "replace" those 32 bits with instructions before the library is loaded at run-time ? If you have the source for libcrypto.so.1.1, which is in software package openssl-1.1.0h (or openssl-libs-1.1.0h depending on your Linux distro) then in file crypto/armv4cpuid.pl change to: ===== _armv7_tick: #ifdef __APPLE__ mrrc p15,0,r0,r1,c14 @ CNTPCT #else @ mrrc p15,1,r0,r1,c14 @ CNTVCT <<< COMMENTED OUT mov r0,#0 @ replacement for valgrind-3.13 mov r1,#0 @ replacement for valgrind-3.13 #endif bx lr ===== Build from the modified source, and install the modified shared library. If you don't have source, then use a hex (binary) editor such as hexedit. Assemble a one-instruction program "mov r0,#0", then over-write the bytes for "mrrc p15,1,r0,r1,cr14" with the bytes for "mov r0,#0". If the code is 32-bit ARM mode, then that's all there is to do. If the code is 16-bit Thumb mode, then over-write the second 16-bit word with "mov r1,#0". Your initial report said "(thumb)", but perhaps that is inaccurate. |
From: Edward D. <eld...@tr...> - 2018-06-29 19:49:38
|
On 6/29/2018 2:47 PM, Alan Corey wrote: > On 6/29/18, Edward Diener <eld...@tr...> wrote: >> On 6/28/2018 9:01 PM, Alan Corey wrote: >>> I'm no expert, but especially if it's arm64 try fetching the absolute >>> latest from https://sourceware.org/git/gitweb.cgi?p=valgrind.git;a=summary >>> >>> That's about the error I got running versions before 3.13 on my Pi and >>> there was something similar even with 3.13 on the same Pi running as >>> arm64. (and my rock64) Search in the archives of this list for >>> arm64, it's probably not the final fix but it works for me. >> >> I am running valgrind 3.13.0 on the arm system. >> >> My attempts at cloning using sourceware.org/git/valgrind.git always get >> permission denied. > > I just had no problem doing > git clone git://sourceware.org/git/valgrind.git > which is the URL on the page. I think you can also get to it through > github but there are something like 20 forks of it, it's safer to use > the sourceware URL. But all that's going to get you is the latest > Valgrind, you may have more serious problems. Best to use the latest > though. I did get this to work properly when I tried it again. Thanks ! I built the latest and tried it against my application, but the same valgrind message still exists. It does look like I will have to wait until this is fixed in valgrind in order to use it for my problem. Someone showed the bug report as: https://bugs.kde.org/show_bug.cgi?id=396001 unhandled instruction: 0xEC51 0x0F1E; ARMv7 libcrypto 'mrrc' so I will have to wait for that fix. The details of my actual problem is that a 3rd party shared library, whose source is publicly available, is crashing when I use it in my application. The crash occurs because somewhere the code of the 3rd party library is overwriting memory. Running under gdb it picks up the crash but the point at which it picks it up is obviously not the point at which it is occurring. So I was hoping valgrind might catch the original memory overwrite but because of the aforementioned bug valgrind does not work on my arm system. Thanks for everyone for their help ! I am sure valgrind is a great product but if it does not currently work on my arm system I have to look elsewhere to solve my problem. > >> >>> >>> On 6/28/18, Edward Diener <eld...@tr...> wrote: >>>> I am attempting to use Valgrind with an application on an embedded arm >>>> system. Debugging with gdb, a problem is occurring with a shared library >>>> used by the application, where gdb is showing a SIGABRT from a malloc >>>> call in a well-supported library, but can not show me the memory >>>> overwrite problem that must be causing the crash. I was hoping using >>>> valgrind could isolate from where the original memory overwrite is >>>> occurring. >>>> >>>> However as soon as I start 'valgrind --leak-check=yes ./myprogram' I get >>>> the message: >>>> >>>> ==621== Memcheck, a memory error detector >>>> ==621== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. >>>> ==621== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright >>>> info >>>> ==621== Command: ./myprogram >>>> ==621== >>>> disInstr(thumb): unhandled instruction: 0xEC51 0x0F1E >>>> ==621== valgrind: Unrecognised instruction at address 0x4cc1767. >>>> ==621== at 0x4CC1766: ??? (in >>>> /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1) >>>> ==621== Your program just tried to execute an instruction that Valgrind >>>> ==621== did not recognise. There are two possible reasons for this. >>>> ==621== 1. Your program has a bug and erroneously jumped to a non-code >>>> ==621== location. If you are running Memcheck and you just saw a >>>> ==621== warning about a bad jump, it's probably your program's fault. >>>> ==621== 2. The instruction is legitimate but Valgrind doesn't handle it, >>>> ==621== i.e. it's Valgrind's fault. If you think this is the case or >>>> ==621== you are not sure, please let us know and we'll try to fix it. >>>> ==621== Either way, Valgrind will now raise a SIGILL signal which will >>>> ==621== probably kill your program. >>>> >>>> Does this mean that valgrind is not reliable for my purposes. It appears >>>> impossible that this problem is being caused by any code execution in >>>> 'myprogram' since the message occurs at the beginning of my valgrind >>>> session and before the first console message 'myprogram' outputs, which >>>> is at the beginning of the 'main' routine. >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Valgrind-users mailing list >> Val...@li... >> https://lists.sourceforge.net/lists/listinfo/valgrind-users >> > > |
From: Alan C. <ala...@gm...> - 2018-06-29 18:47:45
|
On 6/29/18, Edward Diener <eld...@tr...> wrote: > On 6/28/2018 9:01 PM, Alan Corey wrote: >> I'm no expert, but especially if it's arm64 try fetching the absolute >> latest from https://sourceware.org/git/gitweb.cgi?p=valgrind.git;a=summary >> >> That's about the error I got running versions before 3.13 on my Pi and >> there was something similar even with 3.13 on the same Pi running as >> arm64. (and my rock64) Search in the archives of this list for >> arm64, it's probably not the final fix but it works for me. > > I am running valgrind 3.13.0 on the arm system. > > My attempts at cloning using sourceware.org/git/valgrind.git always get > permission denied. I just had no problem doing git clone git://sourceware.org/git/valgrind.git which is the URL on the page. I think you can also get to it through github but there are something like 20 forks of it, it's safer to use the sourceware URL. But all that's going to get you is the latest Valgrind, you may have more serious problems. Best to use the latest though. > >> >> On 6/28/18, Edward Diener <eld...@tr...> wrote: >>> I am attempting to use Valgrind with an application on an embedded arm >>> system. Debugging with gdb, a problem is occurring with a shared library >>> used by the application, where gdb is showing a SIGABRT from a malloc >>> call in a well-supported library, but can not show me the memory >>> overwrite problem that must be causing the crash. I was hoping using >>> valgrind could isolate from where the original memory overwrite is >>> occurring. >>> >>> However as soon as I start 'valgrind --leak-check=yes ./myprogram' I get >>> the message: >>> >>> ==621== Memcheck, a memory error detector >>> ==621== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. >>> ==621== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright >>> info >>> ==621== Command: ./myprogram >>> ==621== >>> disInstr(thumb): unhandled instruction: 0xEC51 0x0F1E >>> ==621== valgrind: Unrecognised instruction at address 0x4cc1767. >>> ==621== at 0x4CC1766: ??? (in >>> /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1) >>> ==621== Your program just tried to execute an instruction that Valgrind >>> ==621== did not recognise. There are two possible reasons for this. >>> ==621== 1. Your program has a bug and erroneously jumped to a non-code >>> ==621== location. If you are running Memcheck and you just saw a >>> ==621== warning about a bad jump, it's probably your program's fault. >>> ==621== 2. The instruction is legitimate but Valgrind doesn't handle it, >>> ==621== i.e. it's Valgrind's fault. If you think this is the case or >>> ==621== you are not sure, please let us know and we'll try to fix it. >>> ==621== Either way, Valgrind will now raise a SIGILL signal which will >>> ==621== probably kill your program. >>> >>> Does this mean that valgrind is not reliable for my purposes. It appears >>> impossible that this problem is being caused by any code execution in >>> 'myprogram' since the message occurs at the beginning of my valgrind >>> session and before the first console message 'myprogram' outputs, which >>> is at the beginning of the 'main' routine. > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > -- ------------- No, I won't call it "climate change", do you have a "reality problem"? - AB1JX Impeach Impeach Impeach Impeach Impeach Impeach Impeach Impeach |
From: Edward D. <eld...@tr...> - 2018-06-29 18:37:16
|
On 6/29/2018 11:52 AM, John Reiser wrote: > https://bugs.kde.org/show_bug.cgi?id=396001 > unhandled instruction: 0xEC51 0x0F1E; ARMv7 libcrypto 'mrrc' Thanks. Looks like the bug needs to be fixed before I can use valgrind successfully with libcrypto being loaded on my arm system. |
From: Edward D. <eld...@tr...> - 2018-06-29 18:34:00
|
On 6/28/2018 9:01 PM, Alan Corey wrote: > I'm no expert, but especially if it's arm64 try fetching the absolute > latest from https://sourceware.org/git/gitweb.cgi?p=valgrind.git;a=summary > > That's about the error I got running versions before 3.13 on my Pi and > there was something similar even with 3.13 on the same Pi running as > arm64. (and my rock64) Search in the archives of this list for > arm64, it's probably not the final fix but it works for me. I am running valgrind 3.13.0 on the arm system. My attempts at cloning using sourceware.org/git/valgrind.git always get permission denied. > > On 6/28/18, Edward Diener <eld...@tr...> wrote: >> I am attempting to use Valgrind with an application on an embedded arm >> system. Debugging with gdb, a problem is occurring with a shared library >> used by the application, where gdb is showing a SIGABRT from a malloc >> call in a well-supported library, but can not show me the memory >> overwrite problem that must be causing the crash. I was hoping using >> valgrind could isolate from where the original memory overwrite is >> occurring. >> >> However as soon as I start 'valgrind --leak-check=yes ./myprogram' I get >> the message: >> >> ==621== Memcheck, a memory error detector >> ==621== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. >> ==621== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info >> ==621== Command: ./myprogram >> ==621== >> disInstr(thumb): unhandled instruction: 0xEC51 0x0F1E >> ==621== valgrind: Unrecognised instruction at address 0x4cc1767. >> ==621== at 0x4CC1766: ??? (in >> /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1) >> ==621== Your program just tried to execute an instruction that Valgrind >> ==621== did not recognise. There are two possible reasons for this. >> ==621== 1. Your program has a bug and erroneously jumped to a non-code >> ==621== location. If you are running Memcheck and you just saw a >> ==621== warning about a bad jump, it's probably your program's fault. >> ==621== 2. The instruction is legitimate but Valgrind doesn't handle it, >> ==621== i.e. it's Valgrind's fault. If you think this is the case or >> ==621== you are not sure, please let us know and we'll try to fix it. >> ==621== Either way, Valgrind will now raise a SIGILL signal which will >> ==621== probably kill your program. >> >> Does this mean that valgrind is not reliable for my purposes. It appears >> impossible that this problem is being caused by any code execution in >> 'myprogram' since the message occurs at the beginning of my valgrind >> session and before the first console message 'myprogram' outputs, which >> is at the beginning of the 'main' routine. |
From: Edward D. <eld...@tr...> - 2018-06-29 18:25:45
|
On 6/29/2018 12:55 AM, John Reiser wrote: > On 06/28/2018, Edward Diener wrote: >> I am attempting to use Valgrind with an application on an embedded arm >> system. > >> ==621== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright >> info >> ==621== Command: ./myprogram >> ==621== >> disInstr(thumb): unhandled instruction: 0xEC51 0x0F1E >> ==621== valgrind: Unrecognised instruction at address 0x4cc1767. >> ==621== at 0x4CC1766: ??? (in >> /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1) > > Dis-assembling the one-line program > .short 0xEC51,0x0F1E > in Thumb mode [using: (gdb) x/i 1 ] gives > mrrc 15,1,r0,r1,cr14 > which is moving data from co-processor 15 register cr14 into registers > r0 and r1. > If the "libcrypto.so.1.1" return address is a correct hint, > then this is some cryptography code checking for the presence of > hardware assist. > You could be more sure of this by dis-assembling several instructions > before and after 0x4CC1766, and by looking at the source code for > libcrypto.so.1.1. > > The actual bits returned by the mrrc instruction depend on the exact > model of the CPU. > What does "cat /proc/cpuinfo" say? processor : 0 model name : ARMv7 Processor rev 5 (v7l) BogoMIPS : 20.12 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xc07 CPU revision : 5 processor : 1 model name : ARMv7 Processor rev 5 (v7l) BogoMIPS : 20.12 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xc07 CPU revision : 5 Hardware : Freescale i.MX7 Dual (Device Tree) Revision : 0000 Serial : 0000000000000000 > > Valgrind does not know enough about your CPU chip. > You can help by filing a bug report; see > http://valgrind.org/support/bug_reports.html . > Be sure to include the version of your C-language run-time library > and how a valgrind developer can download your exact version of > libcrypto.so.1.1. > > To make progress in the meantime, replace those 32 bits by the two > instructions > mov r0,#0 > mov r1,#0 > which clear general registers r0 and r1. This is a guess that zeroes > mean "this CPU has no such hardware assist". The libcrypto software > will choose slower but equivalent code, instead of using > any special hardware assist. How do I "replace" those 32 bits with instructions before the library is loaded at run-time ? |
From: John R. <jr...@bi...> - 2018-06-29 15:52:37
|
https://bugs.kde.org/show_bug.cgi?id=396001 unhandled instruction: 0xEC51 0x0F1E; ARMv7 libcrypto 'mrrc' |
From: Paul F. <pj...@wa...> - 2018-06-29 09:11:38
|
> On 18 Jun 2018, at 15:39, Ivo Raisr <iv...@iv...> wrote: > > Dear Valgrind'ers, > > I have been maintaining the Valgrind Solaris (and partly also illumos) > port for nearly three years, > ensuring it builds and runs on the latest Solaris 11.1, 11.2, 11.3 > (and 11.4 until April 2018). > > > I am still a Valgrind user and contributor, though. Will focus on Linux now. > I. > Hi Ivo A big thanks for all of the work that you’ve done. I guess there’s no backing from Oracle any more. Do you know of anyone on the Illumos side who would be interested/able to help? For my part I do have a PC that runs S11.4, but I don’t use it much these days. I also have an Illumos virtual box, but that doesn’t see much action. A+ Paul |
From: EML <sa2...@cy...> - 2018-06-29 08:15:51
|
Hi Philippe - yes, I think you're right. I've reported a possible race condition on RedHat's pthread_exit (https://bugzilla.redhat.com/show_bug.cgi?id=1596537). Thanks. |
From: John R. <jr...@bi...> - 2018-06-29 04:55:55
|
On 06/28/2018, Edward Diener wrote: > I am attempting to use Valgrind with an application on an embedded arm system. > ==621== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info > ==621== Command: ./myprogram > ==621== > disInstr(thumb): unhandled instruction: 0xEC51 0x0F1E > ==621== valgrind: Unrecognised instruction at address 0x4cc1767. > ==621== at 0x4CC1766: ??? (in /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1) Dis-assembling the one-line program .short 0xEC51,0x0F1E in Thumb mode [using: (gdb) x/i 1 ] gives mrrc 15,1,r0,r1,cr14 which is moving data from co-processor 15 register cr14 into registers r0 and r1. If the "libcrypto.so.1.1" return address is a correct hint, then this is some cryptography code checking for the presence of hardware assist. You could be more sure of this by dis-assembling several instructions before and after 0x4CC1766, and by looking at the source code for libcrypto.so.1.1. The actual bits returned by the mrrc instruction depend on the exact model of the CPU. What does "cat /proc/cpuinfo" say? Valgrind does not know enough about your CPU chip. You can help by filing a bug report; see http://valgrind.org/support/bug_reports.html . Be sure to include the version of your C-language run-time library and how a valgrind developer can download your exact version of libcrypto.so.1.1. To make progress in the meantime, replace those 32 bits by the two instructions mov r0,#0 mov r1,#0 which clear general registers r0 and r1. This is a guess that zeroes mean "this CPU has no such hardware assist". The libcrypto software will choose slower but equivalent code, instead of using any special hardware assist. |
From: Philippe W. <phi...@sk...> - 2018-06-29 03:37:19
|
Yo On Thu, 2018-06-28 at 14:50 +0100, EML wrote: > The program below creates two threads, in a detached state, and waits for them to complete with 'pthread_exit'. Compile and run as: > > > gcc -lpthread test.c > > valgrind --leak-check=full a.out > > valgrind-3.13.0 (compiled from source) reports no errors on some runs, and a possible leak on other runs (560 bytes in 1 blocks), fairly randomly. On my system, the ratio of error-free to bad runs is about 50/50. > > Is this is a problem with valgrind, or my use of pthreads? Note that this isn't the standard 'pthread_create' memory leak with joinable threads which haven't been joined, since the threads are detached. I'm compiling on Centos 6.9, gcc 4.4.7. Thanks. On my system, I systematically have the following possible leak: ==20923== 272 bytes in 1 blocks are possibly lost in loss record 1 of 1 ==20923== at 0x4C2DB70: calloc (vg_replace_malloc.c:711) ==20923== by 0x4011EF1: allocate_dtv (dl-tls.c:322) ==20923== by 0x401287D: _dl_allocate_tls (dl-tls.c:539) ==20923== by 0x4E4100B: allocate_stack (allocatestack.c:580) ==20923== by 0x4E4100B: pthread_create@@GLIBC_2.2.5 (pthread_create.c:539) ==20923== by 0x108936: main (pth.c:19) Assuming what you see is the same leak (always interesting to give the error when you discuss an error :)), the possible leak disappears if I am adding sleep (10); before pthread_exit(0); So, it looks like pthread_exit (0) is executed in your case when a detached thread has not yet cleaned up some of the memory (the dtv array) used for its thread local storage. And when this detached thread exits as the last one of the process, no cleanup of this memory is done. You can further investigate what happens by adding -v -v -v -d -d -d and/or use some more options of memcheck to see what stack trace is releasing this dtv memory when you add the sleep. Philippe |
From: Alan C. <ala...@gm...> - 2018-06-29 01:02:04
|
I'm no expert, but especially if it's arm64 try fetching the absolute latest from https://sourceware.org/git/gitweb.cgi?p=valgrind.git;a=summary That's about the error I got running versions before 3.13 on my Pi and there was something similar even with 3.13 on the same Pi running as arm64. (and my rock64) Search in the archives of this list for arm64, it's probably not the final fix but it works for me. On 6/28/18, Edward Diener <eld...@tr...> wrote: > I am attempting to use Valgrind with an application on an embedded arm > system. Debugging with gdb, a problem is occurring with a shared library > used by the application, where gdb is showing a SIGABRT from a malloc > call in a well-supported library, but can not show me the memory > overwrite problem that must be causing the crash. I was hoping using > valgrind could isolate from where the original memory overwrite is > occurring. > > However as soon as I start 'valgrind --leak-check=yes ./myprogram' I get > the message: > > ==621== Memcheck, a memory error detector > ==621== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. > ==621== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info > ==621== Command: ./myprogram > ==621== > disInstr(thumb): unhandled instruction: 0xEC51 0x0F1E > ==621== valgrind: Unrecognised instruction at address 0x4cc1767. > ==621== at 0x4CC1766: ??? (in > /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1) > ==621== Your program just tried to execute an instruction that Valgrind > ==621== did not recognise. There are two possible reasons for this. > ==621== 1. Your program has a bug and erroneously jumped to a non-code > ==621== location. If you are running Memcheck and you just saw a > ==621== warning about a bad jump, it's probably your program's fault. > ==621== 2. The instruction is legitimate but Valgrind doesn't handle it, > ==621== i.e. it's Valgrind's fault. If you think this is the case or > ==621== you are not sure, please let us know and we'll try to fix it. > ==621== Either way, Valgrind will now raise a SIGILL signal which will > ==621== probably kill your program. > > Does this mean that valgrind is not reliable for my purposes. It appears > impossible that this problem is being caused by any code execution in > 'myprogram' since the message occurs at the beginning of my valgrind > session and before the first console message 'myprogram' outputs, which > is at the beginning of the 'main' routine. > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > -- ------------- No, I won't call it "climate change", do you have a "reality problem"? - AB1JX Impeach Impeach Impeach Impeach Impeach Impeach Impeach Impeach |
From: Edward D. <eld...@tr...> - 2018-06-29 00:38:11
|
I am attempting to use Valgrind with an application on an embedded arm system. Debugging with gdb, a problem is occurring with a shared library used by the application, where gdb is showing a SIGABRT from a malloc call in a well-supported library, but can not show me the memory overwrite problem that must be causing the crash. I was hoping using valgrind could isolate from where the original memory overwrite is occurring. However as soon as I start 'valgrind --leak-check=yes ./myprogram' I get the message: ==621== Memcheck, a memory error detector ==621== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==621== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info ==621== Command: ./myprogram ==621== disInstr(thumb): unhandled instruction: 0xEC51 0x0F1E ==621== valgrind: Unrecognised instruction at address 0x4cc1767. ==621== at 0x4CC1766: ??? (in /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1) ==621== Your program just tried to execute an instruction that Valgrind ==621== did not recognise. There are two possible reasons for this. ==621== 1. Your program has a bug and erroneously jumped to a non-code ==621== location. If you are running Memcheck and you just saw a ==621== warning about a bad jump, it's probably your program's fault. ==621== 2. The instruction is legitimate but Valgrind doesn't handle it, ==621== i.e. it's Valgrind's fault. If you think this is the case or ==621== you are not sure, please let us know and we'll try to fix it. ==621== Either way, Valgrind will now raise a SIGILL signal which will ==621== probably kill your program. Does this mean that valgrind is not reliable for my purposes. It appears impossible that this problem is being caused by any code execution in 'myprogram' since the message occurs at the beginning of my valgrind session and before the first console message 'myprogram' outputs, which is at the beginning of the 'main' routine. |