LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-16-2014, 05:51 AM   #1
WoldemarShiPa
LQ Newbie
 
Registered: Apr 2014
Posts: 11

Rep: Reputation: Disabled
valgrind HelloWorld


Gentoo. Trying to valgrind simple app:
Code:
#include <iostream>

int main()
{
    std::cout << "Hello World!" << std::endl;
    return 0;
}
Getting:

vex x86->IR: unhandled instruction bytes: 0xC4 0xE2 0x79 0xF7
==16978== valgrind: Unrecognised instruction at address 0x4001a05.
==16978== at 0x4001A05: dl_main (rtld.c:1170)
==16978== by 0x40151C2: _dl_sysdep_start (dl-sysdep.c:249)
==16978== by 0x4004A42: _dl_start_final (rtld.c:331)
==16978== by 0x4004A42: _dl_start (rtld.c:557)
==16978== by 0x4000FE6: ??? (in /lib/ld-2.19.so)


dev-util/valgrind-3.10.1 was built with the following:
USE="-mpi"
CFLAGS="-march=native -O2 -pipe -fno-stack-protector"
CXXFLAGS="-march=native -O2 -pipe -fno-stack-protector"

sys-libs/glibc-2.19-r1 was built with the following:
USE="debug -gd (-hardened) (-multilib) -nscd -profile (-selinux) -suid -systemtap -vanilla"
CFLAGS="-march=native -pipe -g -O2 -fno-strict-aliasing -fno-stack-protector"
CXXFLAGS="-march=native -pipe -g -O2 -fno-strict-aliasing -fno-stack-protector"

Also, FEATURES="splitdebug" set in /etc/portage/env

Last edited by WoldemarShiPa; 12-16-2014 at 05:54 AM.
 
Old 12-16-2014, 12:24 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,890
Blog Entries: 13

Rep: Reputation: 4934Reputation: 4934Reputation: 4934Reputation: 4934Reputation: 4934Reputation: 4934Reputation: 4934Reputation: 4934Reputation: 4934Reputation: 4934Reputation: 4934
Seems like there's a problem with your install of valgrind. What command did you run to get this output?
 
Old 12-17-2014, 07:05 AM   #3
WoldemarShiPa
LQ Newbie
 
Registered: Apr 2014
Posts: 11

Original Poster
Rep: Reputation: Disabled
Command is "valgrind ./test"
Also, I have Gentoo box with older gcc version (4.7.3 vs 4.8.3) and valgrind does well there. Now I'll try to compile with -march=corei7-avx instead of -march=native. Still researching.

Yes, used -march=corei7-avx and problem was solved.

Note: Core Duo box works well with march=native

Last edited by WoldemarShiPa; 12-17-2014 at 07:47 AM.
 
  


Reply

Tags
glibc, valgrind


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NewUser-Helloworld petebarth Linux - Newbie 3 08-14-2014 01:26 PM
helloWorld johnmcclenon LinuxQuestions.org Member Intro 1 08-29-2013 01:12 AM
helloWorld AKB48 LinuxQuestions.org Member Intro 1 02-29-2012 09:17 PM
Helloworld dennisdd Programming 2 10-21-2011 03:38 AM
compiling HelloWorld with QT fakie_flip Programming 1 01-18-2006 01:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration