|
From: Brian B. <bri...@gm...> - 2012-04-20 14:00:50
|
Consider building everything in debug mode. This will give you line numbers. Brian On Apr 20, 2012 1:59 AM, "achinta gogoi" <ach...@ya...> wrote: > > Sir, > > Please help to solve bellow errors. Thanks > with Regard > Achinta Kumar gogoi > > ----- Forwarded Message ----- > *From:* Julian Seward <js...@ac...> > *To:* achinta gogoi <ach...@ya...> > *Sent:* Thursday, April 19, 2012 6:39 PM > *Subject:* Re: Need Help to fix to below error > > > Please send this to the valgrind-users mailing list, not here. > Maybe somebody on that list can help you. > > J > > On Thursday, April 19, 2012, you wrote: > > Dear Sir, > > > > I would like to inform you that when I was trying to run my programm I > got > > bellow errors. Please help me to solve this error. Bellow are the details > > of the errors and the OS and valgrind that I am using. Thank you in > > advanced. > > > > With regards > > Achinta Kumar Gogoi. > > > > > > valgrind version : valgrind-3.6.1 > > > > OS : Fedora (Fedora release 15) > > > > > > > > Bug Report > > > > ==3898== Memcheck, a memory error detector > > ==3898== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al. > > ==3898== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright > info > > ==3898== Command: ./mkvariable_key > > ==3898== > > Enter 1 to generate new 1st pkey,2 to 1st dkey,3 to 2pkey,4 to 2dkey ,5 > to > > 3dkey and 6 to generate 3dkey following all the proces : 6 > > > > Enter Key length : > > 128 > > > > How many cycles you want to write :100 > > 1804289383 > > 846930886 > > 1681692777 > > 1714636915 > > ==3898== Conditional jump or move depends on uninitialised value(s) > > ==3898== at 0x4007697: __GI_strlen (mc_replace_strmem.c:284) > > ==3898== by 0x4884B94D: fputs (in /lib/libc-2.14.1.so) > > ==3898== by 0x80488F8: mk1pkey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A5B9: finalKey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A89E: main (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > > > > Pkey1 : 128 > > ==3898== Conditional jump or move depends on uninitialised value(s) > > ==3898== at 0x8048F12: mk1dkey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A5BE: finalKey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A89E: main (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > > ==3898== Conditional jump or move depends on uninitialised value(s) > > ==3898== at 0x8048AD4: select_rand_pos (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x80490CB: mk1dkey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A5BE: finalKey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A89E: main (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > > > 011010111000101101000101011001110011001001111011001000111100011001100100001 > > 11100100110000110100101100110001100110100100001110011 digits > > ==3898== Conditional jump or move depends on uninitialised value(s) > > ==3898== at 0x8048AD4: select_rand_pos (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x8049310: mk1dkey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A5BE: finalKey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A89E: main (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > > ==3898== Invalid read of size 4 > > ==3898== at 0x8048ACF: select_rand_pos (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x8049310: mk1dkey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A5BE: finalKey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A89E: main (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > > Address 0x4021140 is 0 bytes after a block of size 128 alloc'd ==3898== > > at 0x4006D69: malloc (vg_replace_malloc.c:236) > > ==3898== by 0x8048A5C: select_rand_pos (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x8049310: mk1dkey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A5BE: finalKey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A89E: main (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > > ==3898== Invalid write of size 4 > > ==3898== at 0x8048B0E: select_rand_pos (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x8049310: mk1dkey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A5BE: finalKey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A89E: main (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > > Address 0x4021140 is 0 bytes after a block of size 128 alloc'd ==3898== > > at 0x4006D69: malloc (vg_replace_malloc.c:236) > > ==3898== by 0x8048A5C: select_rand_pos (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x8049310: mk1dkey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A5BE: finalKey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A89E: main (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > > ==3898== Invalid read of size 1 > > ==3898== at 0x4007693: __GI_strlen (mc_replace_strmem.c:284) > > ==3898== by 0x4884B94D: fputs (in /lib/libc-2.14.1.so) > > ==3898== by 0x8048C0F: convert4bit (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804931D: mk1dkey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A5BE: finalKey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A89E: main (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > > Address 0x4021380 is 0 bytes after a block of size 128 alloc'd ==3898== > > at 0x4006D69: malloc (vg_replace_malloc.c:236) > > ==3898== by 0x8048B80: convert4bit (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804931D: mk1dkey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A5BE: finalKey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A89E: main (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > > > > %%%%%%%%%%%%%%%%%%% > > > 000101001001001100100101010001110001000000100111011010000111100110000001000 > > 00011010000001000011100010010010000001000001100110100 Dkey1 : 128 > > ==3898== Conditional jump or move depends on uninitialised value(s) > > ==3898== at 0x8049E7B: mk2pkey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A5C3: finalKey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A89E: main (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > > 1000000 > > Pkey2 : 127 > > > > ---------------------------------------- > > ==3898== Conditional jump or move depends on uninitialised value(s) > > ==3898== at 0x8049735: mk2dkey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A5CE: finalKey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A89E: main (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > > > 111111101010100110011101110100101100011011110110101101100100100011100001011 > > 1110010101110011010001001111000101000011000001000000 > > > > values of C : > > > > ==3898== Conditional jump or move depends on uninitialised value(s) > > ==3898== at 0x8048AD4: select_rand_pos (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x80498FA: mk2dkey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A5CE: finalKey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A89E: main (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > > ==3898== Conditional jump or move depends on uninitialised value(s) > > ==3898== at 0x8048AD4: select_rand_pos (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x8049B3D: mk2dkey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A5CE: finalKey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A89E: main (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > > ==3898== Invalid read of size 4 > > ==3898== at 0x8048ACF: select_rand_pos (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x8049B3D: mk2dkey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A5CE: finalKey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A89E: main (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > > Address 0x4023a98 is 0 bytes after a block of size 128 alloc'd ==3898== > > at 0x4006D69: malloc (vg_replace_malloc.c:236) > > ==3898== by 0x8048A5C: select_rand_pos (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x8049B3D: mk2dkey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A5CE: finalKey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A89E: main (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > > ==3898== Invalid write of size 4 > > ==3898== at 0x8048B0E: select_rand_pos (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x8049B3D: mk2dkey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A5CE: finalKey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A89E: main (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > > Address 0x4023a98 is 0 bytes after a block of size 128 alloc'd ==3898== > > at 0x4006D69: malloc (vg_replace_malloc.c:236) > > ==3898== by 0x8048A5C: select_rand_pos (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x8049B3D: mk2dkey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A5CE: finalKey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A89E: main (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > > > > calling convert bit > > > > Mode :0 > > ==3898== Conditional jump or move depends on uninitialised value(s) > > ==3898== at 0x4007697: __GI_strlen (mc_replace_strmem.c:284) > > ==3898== by 0x4884B94D: fputs (in /lib/libc-2.14.1.so) > > ==3898== by 0x804948E: convertnew4bit (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x8049B5D: mk2dkey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A5CE: finalKey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A89E: main (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > > > > calling convert bit > > > > Mode :1 > > > > Dkey2 : 256 > > > > ******************************************* > > > 011001100000000100010011010101100000100000010010001100010010001100110010011 > > > 100110101011110000111100001010111100101000101000100010000100001111001100010 > > > 010011011101010110001001100010011001100011000110000001001000010000001100100 > > 0010000000101110010100000010010 ++++++++++++++J : 128 > > > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > > 111100010100111100100101000101000001100011101010101110111011010100101011101 > > 10010111101110111110001100101010000010100011001100101 dkey3 : 128 > > > > New_Mode :1 1505335290 > > 1738766719 > > 190686788 > > 260874575 > > > > Pkey1 : 128 > > ==3898== Invalid write of size 4 > > ==3898== at 0x80489FB: extract_digit (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x80492EE: mk1dkey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A5BE: finalKey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A89E: main (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > > Address 0x4026a70 is 0 bytes after a block of size 2,048 alloc'd > > ==3898== at 0x4006D69: malloc (vg_replace_malloc.c:236) > > ==3898== by 0x8048952: extract_digit (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x80492EE: mk1dkey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A5BE: finalKey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A89E: main (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > > > 010110011011100110010111111110100110011110100011011110010111111100001011010 > > 11101101001100100010000001111100011001010000101001111 digits > > --3898-- VALGRIND INTERNAL ERROR: Valgrind received a signal 11 > (SIGSEGV) - > > exiting --3898-- si_code=1; Faulting address: 0x726F6665; sp: > 0x62d8fa74 > > > > valgrind: the 'impossible' happened: > > Killed by fatal signal > > ==3898== at 0x380B31F3: myvprintf_str (m_debuglog.c:578) > > ==3898== by 0x380B3A31: vgPlain_debugLog_vprintf (m_debuglog.c:925) > > ==3898== by 0x6E697266: ??? > > > > sched status: > > running_tid=1 > > > > Thread 1: status = VgTs_Runnable > > ==3898== at 0x4006D69: malloc (vg_replace_malloc.c:236) > > ==3898== by 0x8048A5C: select_rand_pos (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x8049310: mk1dkey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A5BE: finalKey (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) ==3898== > by > > 0x804A89E: main (in > > /home/achinta/Desktop/Cryp_random_test_DITP/mkvariable_key) > > > > > > 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 Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > > |