Suprising seg fault!!!

Discussion in 'C++' started by Vinod, Sep 27, 2003.

  1. Vinod

    Vinod Guest

    Hi!!

    I am having a very strange problem with my C++ code.

    I am developing a simulator which converts a source language into
    intermediate code (C++). This code when compiled with a library
    API(C++) creates a final executable. The executable shows the behavior
    of the simulator.

    The problem that I am currently facing is that the executable seg
    faults based on the directory in which i compile the intermediate
    code.

    I am using libtools so I do not expect any linking problems. Infact I
    donot have any errors during compilation/linking stage. The
    intermediate code when compiled always produces the executable. I do
    both the intermediate code generation and compilation in the same
    directory. When I do these 2 steps in directory A it works. However it
    fails when I do the same in directory B. How is this possible???

    Thanks in advance for your reply.

    Vinod Chamarty
     
    Vinod, Sep 27, 2003
    #1
    1. Advertising

  2. Vinod wrote:

    > Hi!!
    >
    > I am having a very strange problem with my C++ code.
    >
    > I am developing a simulator which converts a source language into
    > intermediate code (C++). This code when compiled with a library
    > API(C++) creates a final executable. The executable shows the behavior
    > of the simulator.
    >
    > The problem that I am currently facing is that the executable seg
    > faults based on the directory in which i compile the intermediate
    > code.
    >
    > I am using libtools so I do not expect any linking problems. Infact I
    > donot have any errors during compilation/linking stage. The
    > intermediate code when compiled always produces the executable. I do
    > both the intermediate code generation and compilation in the same
    > directory. When I do these 2 steps in directory A it works. However it
    > fails when I do the same in directory B. How is this possible???
    >
    > Thanks in advance for your reply.


    I can't see any way that this could possibly be related to the C++
    language. It seems to be an issue with your development tools.

    http://www.slack.net/~shiva/welcome.txt
    http://www.slack.net/~shiva/offtopic.txt

    -Kevin
    --
    My email address is valid, but changes periodically.
    To contact me please use the address from a recent posting.
     
    Kevin Goodsell, Sep 27, 2003
    #2
    1. Advertising

  3. Vinod

    Mike Wahler Guest

    Re: [OT] Suprising seg fault!!!

    "Vinod" <> wrote in message
    news:...
    > Hi!!
    >
    > I am having a very strange problem with my C++ code.


    But you don't describe anything about C++.

    > When I do these 2 steps in directory A it works. However it
    > fails when I do the same in directory B. How is this possible???


    Directory A is for applications with (A)wesome performance.

    Directory B is for applications which (B)omb when launched
    from there.

    > Thanks in advance for your reply.


    Thanks in advance for reading:
    http://www.slack.net/~shiva/welcome.txt
    before posting here again.

    -Mike
    Blame it on the seg. Yeah, that's it, it's the seg's fault.
     
    Mike Wahler, Sep 27, 2003
    #3
  4. Vinod

    Ron Natalie Guest

    "Vinod" <> wrote in message news:...

    > I am developing a simulator which converts a source language into
    > intermediate code (C++). This code when compiled with a library
    > API(C++) creates a final executable. The executable shows the behavior
    > of the simulator.


    This is often a feature of some miscoding that leads to something that in the C++
    language is "undefined behavior." One of the insidious problems with undefined
    behavior is that it works normally in some cases and not in others.
     
    Ron Natalie, Sep 27, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Corrine
    Replies:
    1
    Views:
    435
    Gianni Mariani
    Nov 27, 2003
  2. Manuel Maria Diaz Gomez

    fstream::open & seg fault

    Manuel Maria Diaz Gomez, Jul 20, 2004, in forum: C++
    Replies:
    3
    Views:
    1,238
    John Harrison
    Jul 20, 2004
  3. goktan
    Replies:
    4
    Views:
    2,031
    Howard
    Aug 2, 2004
  4. onkar

    suprising output !!

    onkar, Feb 20, 2008, in forum: C Programming
    Replies:
    5
    Views:
    316
    santosh
    Feb 21, 2008
  5. Farrel Lifson
    Replies:
    13
    Views:
    190
    James Britt
    Feb 26, 2008
Loading...

Share This Page