Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 352459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:44:21+00:00 2026-05-12T11:44:21+00:00

(My environment is 64-bit Ubuntu, my application is C++ compiled and linked with g++.)

  • 0

(My environment is 64-bit Ubuntu, my application is C++ compiled and linked with g++.)

When an application does something like divide by zero or run a asm("int $3") left in the code, one of the following gets logged via syslog to /var/log/kern.log and /var/log/messages:

Sep 10 18:06:47 VM kernel: [117194.123452] a.out[20288] trap divide error ip:45c59d sp:7fff65a91810 error:0 in a.out[400000+144000]
Sep 10 18:07:10 VM kernel: [117217.020833] a.out[20294] trap int3 ip:45c493 sp:7fff5cc559f0 error:0

In both those cases, the instruction pointer address points to something that I can easily look up in the .map file produced at link time (using the “-Wl,-Map,output.map“).

But if I cause a seg fault, in this case by a call to memcpy() with the source set to NULL, the instruction pointer is so out of range, I have no idea how it is supposed to be mapped:

Sep 10 18:06:13 VM kernel: [117160.228587] a.out[20282]: segfault at 0 ip 00007f7e79209092 sp 00007fff831faf08 error 4 in libc-2.9.so[7f7e79185000+168000]

In this example, I would have expected the IP to be in the range of 0x445e70-0x445e7f, which is the location of memcpy() according to my .map file.

My question: What is the trick to interpreting the ip in this case?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T11:44:21+00:00Added an answer on May 12, 2026 at 11:44 am

    According to the message it looks like it crashed inside memcpy(), from libc-2.9.so, which is mapped in to your process starting at 0x7f7e79185000. This is expected since memcpy is the function that is attempting to dereference the pointer. The instruction pointer looks valid since it is within the range of libc. If you were intending to override memcpy and call your own version, you may need to compile with -fno-builtin-memcpy.

    Edit: You may be linking libc statically but according to the message you also have the libc shared library mapped into your process memory. You should see it listed in /proc/pid/maps while your program is running. It may be that you are linking with another shared library, such as libstdc++, and it depends on the libc shared library. As a result you have two versions of memcpy, and in this case it is calling the libc shared library version which is mapped at the high address. If you don’t want the libc shared library then make sure you are linking all libraries statically; use the -static option at the beginning of your link line.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am on Ubuntu x64 bit running: java version 1.6.0_18 OpenJDK Runtime Environment (IcedTea6
Here's the scenario I'm having: I've created a debootstrap ubuntu maverick (64-bit) environment. I
I'm trying to run my play 2.0.1 application on Ubuntu 11.10 and when I
Ubuntu 10.04 64-bit looks promising as a development environment for Android. I now have
Our production environment runs 3 32-Bit Java 6 JVMs on each Windows 2003 server.
In our environment, we have 32-bit and 64-bit machines for development. In VS 2010,
So I'm starting to learn a bit of lisp/elisp to optimize my emacs environment,
ENVIRONMENT: C# I have a table of equivalent values, like this: CHEVR = CHEVROLET
I just moved from an Ubuntu PHP workstation dev environment back to Windows and
Is there any way to detect a 64-bit java install in a 32-bit environment?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.