Strange behavior in run-time vs. dbx behavior when using shmget

From: Israel Waldman (israelaix_at_hotmail.com)
Date: 05/29/04


Date: 29 May 2004 10:42:19 -0700

Hi,
I have a very strange problem, and i don't know what is the reason for
it.
I'm using an AIX 5.1 over power_604.
In my hi-level program (written in c), I'm writing some machine
commands to 0x60000000 segment using shmget and shmat, and after it,
in the assembly code, I'm adding only 2 commands which are;
mtlr xxx //where xxx holds 0x60000000
brl
The purpose of this code is to branch to segment 0x60000000, executing
some machine commands, and from there returning to the branching
procedure.
If i run this application using dbx, it works fine.
I run time, however, after executing the brl command which is
mentioned above, i have a run time error regarding an illegal op-code,
i.e., in the address 0x60000000 there are other bytes rather the
machine commands i wrote to this address!!!
In my program i'm using shmctl and shmdt.
I don't know what the hell is going on!

I have some ideas:
1. maybe other process is using this 0x60000000 segment.
2. maybe the core in making some optimizations.
3. maybe i don't use shmget right.
4. maybe some kind of special compilation is needed.

I will be very happy to get some help in this

Thanks

Israel



Relevant Pages

  • festival C++ api
    ... does anyone know how retrieve phoneme information (utt 'Segment) from ... festival via the C++ api? ... it is easy to send commands using ...
    (comp.speech.research)
  • Re: How can I deny viewing the local drive from Internet Explorer?
    ... I don't want a certain segment of users to have the ability to browse the system32 directory and run commands from there. ...
    (microsoft.public.windowsxp.security_admin)