f



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

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
0
israelaix (27)
5/29/2004 5:42:19 PM
comp.unix.aix 10963 articles. 1 followers. drkirkby (98) is leader. Post Follow

1 Replies
418 Views

Similar Articles

[PageSpeed] 52

israelaix@hotmail.com (Israel Waldman) writes:

> I have some ideas:
> 1. maybe other process is using this 0x60000000 segment.
....
5. Maybe you are not following the procedure one must follow when
   writing self-modifying code, e.g. flushing D-cache to memory.

Search for "Self-modifying code" here:
http://www-106.ibm.com/developerworks/linux/library/l-powarch/

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
0
5/29/2004 6:37:05 PM
Reply:

Similar Artilces:

Strange behavior in run-time vs. dbx behavior when using shmget
Hi Paul, Thanks for your answer to my problem "Subject: Strange behavior in run-time vs. dbx behavior when using shmget". I don't understand how your hint will help me. Maybe i was misunderstood. I'm writing to the 0x60000000 segment only once in the beginning of my application, so the code there isn't supposed to be changed, and in this segment there are no calls to other procedures in this segment. So only a code from segment 0x10000000 will branch to this segment. Maybe you mean that before writing to this segment i should flush the buffer? Thanks Israel israelaix@hotmail.com (Israel Waldman) writes: > Hi Paul, If you wanted to ask me personally, it is probably would have been better to just send a private e-mail. However, having decided to use the usenet, you should have really continued the thread you have already started, not start a new one. [You do know there is a difference, don't you?] > Maybe you mean that before writing to this segment i should flush the > buffer? What I meant is that this sequence doesn't work on PowerPC: void *ip = ... // (1) some operation that returns a pointer to // writable and executable page, e.g. 0x60000000 // (2) code to construct executable instructions at address ip // (3) [missing steps] void (*func)(void) = (void (*)())ip; (*ip)(); // call the dynamically-generated code @ 0x600... The missing steps in (3) are flushing D-cache and invalidating I-cache. You ma...

Behaviors in Behaviors
Hi group, I'm facing this problem. I've got a behavior which makes a kind of toolbar, except the buttons on it. Within this behavior i build an element, which contains a different behavior. So far so good. everything works fine. But when i'm trying to access a method in the second behavior, i'm getting this error about an object being null. How can i access this method? i'm using this kind of construction: toolbar.close.disable(); where toolbar is the id of my first behavior, close is the id of the behavior inside the first one, and disable is a method in the second one.....

Strange behavior using a module which uses another module
Hi, it's me again :-) I'm testing my function libraries against a standard library and I don't understand what's happening. The libraries I developed are called md_Jacobi and md_Global_funcs. The standard library function is dgamma.f from SPECFUN. module md_Global_funcs contains .... real function lgamma(x) .... write(*,*) 'foo' ! Keep in mind this instruction... .... end function lgamma .... end module md_Global_funcs module md_Jacobi use md_Global_funcs ..... end module md_Jacobi program main use md_Jacobi external dgamma ..... do i=1,10 write(*,*) 'x', i, 'dgamma', dgamma(real(i)), 'gamma', gamma(real(i)), 'n!',factorial(i), lgamma(real(i)) end do ..... end program main 1) I was surprised that main was able to access gamma, lgamma and factorial, defined in md_Global_funcs, since main only uses md_Jacobi and not md_Global_funcs. However, I looked at MRC and found that since md_Jacobi uses md_Global_funcs, then main has access to it also. Is it possible to let a program unit A use a module B, without having access to any module used by B unless explicitly used by A? 2) compiling with EFC, I get the following error: forrtl: severe (40): recursive I/O operation, unit -1, file unknown Image PC Routine Line Source main 40000000000C6190 Unknown Unknown Unknown main 40000000000C2620 Unknown Unknown Unknown ...

Strange behavior of "use if" (a conditional "use" with the if module)
I have a program with this line of code: use if( $Config{'osname'} =~ /Win/ ), 'Win32::Process::Info'; Perl complains: Too few arguments to `use if' (some code returning an empty list in list context?) at ... However, if I change the regex operator to !~ then Perl is quite happy (the only change is replacing the equals with a bang). Does anyone know why Perl is unhappy with =~ in my "use if" statement thanks! * David Filmer wrote in comp.lang.perl.misc: >I have a program with this line of code: > > use if( $Config{'osname'} =~ /Win/ ), 'Win32::Process::Info'; > >Perl complains: > >Too few arguments to `use if' (some code returning an empty list in list context?) at ... If your osname actually matches /Win/ then you probably forgot to load Config.pm. Otherwise, the expression returns an empty list, so there are no arguments passed, just like the error message says. Use something like `scalar($Config{'osname'} =~ /Win/)` to force a scalar context. -- Bj�rn H�hrmann � mailto:bjoern@hoehrmann.de � http://bjoern.hoehrmann.de Am Badedeich 7 � Telefon: +49(0)160/4415681 � http://www.bjoernsworld.de 25899 Dageb�ll � PGP Pub. KeyID: 0xA4357E78 � http://www.websitedev.de/ Quoth David Filmer <usenet@davidfilmer.com>: > I have a program with this line of code: > > use if( $Config{'osname'} =~ /Win/ ), 'Win32::Process::Info'...

behavior managing behavior
I'd like to know what human/animal behaviour needs to be managed or controlled and by which humans, why, and for what purpose. "JPL Verhey" <pv@nospamwhatsoever.nu> wrote: > I'd like to know what human/animal behaviour needs to be managed or > controlled and by which humans, why, and for what purpose. I need to control the barking of my dog at times so that he doesn't scare people. One delivery guy almost left without dropping of the package I was wating for because he was so afraid of my dog. -- Curt Welch htt...

solve run-time behavior
Hi, I`m using solve to solve set of implicit equations which includes polynomials with maximum order of four. I`m experiencing an exponential run-time behavior. For instance, 100 equations takes 0.47 seconds, 144 equations takes 2.03 seconds, and 196 equations takes 11.51 seconds (!). Is it normal run-time behavior of solve ? If yes, any reference, which indicates it, is most welcome. Thank You, On 2/25/15 9:41 AM, Yaniv Ben wrote: > Is it normal run-time behavior of solve ? The theory says that the worst-case behavior can be double exponential, as in O(exp(exp(n)...

strange behavior when using nconc
Hi, I am trying to pick up Common Lisp, and whilst playing around with list functions I have come across a rather strange situation that I am failing to understand. Here are two functions that I have defined: (defun not-ok (x) (nconc x (list 'c))) (defun test () (let ((x '(1))) (not-ok x) x)) These are the results that I get when calling test CL-USER> (test) (1 C) CL-USER> (test) (1 C C) CL-USER> (test) (1 C C C) CL-USER> (test) (1 C C C C) CL-USER> (test) (1 C C C C C) I really do not understand why let is not initializing x to a new list but rather x ...

Effecting run time change in behavior
Hi I am writing to seek opinion on a problem I need to solve, preferably using a pattern oriented approach : Lets assume, we have a wrapper class (in my case, it is a Transaction manager) in which I have set the classpath to some classes (call them servant classes) on which the wrapper uses an ObjectInputStream/OutputStream operation. The wrapper class runs in an infinite loop. Now, if I replace a servant class at run time with a new version, I want the wrapper class to take the new servant class version into effect (it should recognise the new servants). What is happening now is that even if I overwrite the old servant classes, the Tx Manager still does not take the new versions into consideration. What could be a solution to this problem ? Note : I can not stop the Tx Manager. Regards Kallol "Kallol Borah" <kallol.borah@gmail.com> writes: > Lets assume, we have a wrapper class (in my case, it is a > Transaction manager) in which I have set the classpath to some > classes (call them servant classes) on which the wrapper uses an > ObjectInputStream/OutputStream operation. The wrapper class runs in > an infinite loop. Now, if I replace a servant class at run time with > a new version, I want the wrapper class to take the new servant > class version into effect (it should recognise the new servants). Since it sounds like you're using Java, I'll give a Java-specific answer. One option is to have the wrapper remember the tim...

Strange behavior of ps2pdf between linux and Unix
Hi everybody. In my ps file I have the following command /Border [1 1 1 [3]] used for specifying the border type of a rectangle. In Unix, I'm using "gs 5. Aladdin Ghostscript 5.50" and ps2pdf woks fine generating a dotted border. When I use a linux machine with "GNU Ghostscript 7.05 (2002-04-22)" instead ps2pdf generates a continuous border! Is there any tips in order to say GNU gs to produce dotted border too? Thank you, Camelot On Wed, 30 Jan 2008 07:46:57 -0800 (PST) camelot <scosmo@tiscalinet.it> wrote: > When I use a linux machine with "GNU Ghostscript 7.05 > (2002-04-22)" instead ps2pdf generates a continuous border! Is there > any tips in order to say GNU gs to produce dotted border too? Camelot, Those are both very old versions. I would suggest you upgrade them to the recent release of GS. If you send me a small test .ps file (< 1 MB) that shows the problem, I will try the conversion on my Linux box with GS 8.54 to see if they fixed the problem. Mike PS: Your email inbox is overquota and so I can't send you email. Thank you for your availability. I tried with the last version of gs for linux and the problems persist. Camelot On Thu, 31 Jan 2008 00:11:46 -0800 (PST) camelot <scosmo@tiscalinet.it> wrote: > Thank you for your availability. > I tried with the last version of gs for linux and the problems > persist. How was the PS generated? If from TeX, can you post a minimal ex...

Strange behavior of ps2pdf between linux and Unix
Hi everybody, nn my ps file I have the following command /Border [1 1 1 [3]] used for specifying the border type of a rectangle. In Unix, I'm using "gs 5. Aladdin Ghostscript 5.50" and ps2pdf woks fine generating a dotted border. When I use a linux machine with "GNU Ghostscript 7.05 (2002-04-22)" instead ps2pdf generates a continuous border! Is there any tips in order to say GNU gs to produce dotted border too? Thank you, Camelot camelot wrote: > When I use a linux machine with "GNU Ghostscript 7.05 > (2002-04-22)" instead ps2pdf generates a continuous border! Is there > any tips in order to say GNU gs to produce dotted border too? 1. Install the current release (8.61) or development HEAD 2. Retest the file. 3. File a bug report if the problem persists. On Jan 30, 5:07 am, camelot <sco...@tiscalinet.it> wrote: > Hi everybody, > nn my ps file I have the following command /Border [1 1 1 [3]] used I'm not sure what operator you are calling with /Border Here is an complete example of a dashed rectangle %! [10 30] 0 setdash [36 36 360 360] rectstroke showpage Ed ...

Memory corruption and dbx strange behavior.
I see memory corruption in my code. I cant use purify some reason. I can consistently reproduce the corruption. In my code, i have a global array and its value is corrupted after running program for some time. i used following command in dbx stop access w &globalArray[5] value at index 5 is corrupted without hitting the break point. is there any way i can make content of globalArray readonly ? shaanxxx wrote: Please wrap your lines! > I see memory corruption in my code. I cant use purify some reason. I > can consistently reproduce the corruption. In my code, i...

Help
Hi. Welcome all for the first time. The situation is : AIX 5.3 on p575 LPAR and 14GB of RAM What is stange - well topas shows that there is a 30% of free RAM memory. When I try to run another java process suddenly AIX allocates all his swap space (process have enough ram, if of course topas showes truth) and kill the process. Errpt shows No free swap space. How to diagnose and countercact this?? -- Pozdrawiam Krzysztof "SQ7IQZ" Kardas GG:2471254 ICQ:53263009 Skype:krzychk2 What are your memory tunables settings for the following (vmo -L): minperm% maxperm% maxlcient% lru_file_repage Also, check your paging space size (lsps -a). Do you have enough? Also, what processes are using the most memory? (svmon -P) Brent ...

Strange scrolling behavior using GWindows Multiple_Selection_List_Box
I am using GWindows Version 1.0 and using a Multiple_Selection_List_Box to allow selection of multiple files in a directory. This issue is noticeable when the control is loaded with several dozen file names. The list box is set u with a vertical scroll bar. When I move the list box actuator all the way to the bottom, the display only scrolls part way through the list. If I release the actuator when at the bottom, it returns to the top position and the list stays at the same position. If I then click in the scroll bar below the actuator, the displayed portion of the list displays more entries toward the bottom end of the list. Is this corrected in Version 1.1 of GWindows? Is there a better way to select multiple files? "Ron Baldwin" <no-spam-rebaldwin@adelphia.net> wrote in message news:np27g0p52h4qh9fc92tjsu5nl9gilgqde6@4ax.com... .... > Is this corrected in Version 1.1 of GWindows? Is there a better way > to select multiple files? I don't know about GWindows specifically, but in Windows, one way to select files is to customize the Open File dialog. The Open File dialog can handle multiple selections, and it already does the dirty work of navigation. Certainly Claw.Dialog.File supports both customization and multiple selections (I've used both in various programs). The only problem is that that dialog is not included in the Introductory version of Claw -- it's only available in the paid version. Disclaimer: I'm the lead design...

strange behavior when using 'read'
Hi, I have a web/cgi script that allows users to upload a file to the web server. I want to only allow files up to a certain size, which is stored in $imageFileMaxSize (typically 75K). That part works correctly, i.e. the script does not allow uploads larger than $imageFileMaxSize. The problem is, when a user attempts to upload a file larger than $imageFileMaxSize, the on_error routine is not called; instead the script reloads from its starting point, with no message. My users find this confusing, sometimes thinking the file has been uploaded, sometimes getting frustrated and trying again. Ho...

Strange behavior when using pattern match and HoldAll
I am using HoldAll with a function that I would like to modify a list passed to it, as described on http://forums.wolfram.com/student-support/topics/21247 I wrote this: Clear[test]; Remove[test]; SetAttributes[test, HoldAll] test[list_List, val_] := list[[2]] = val; This doesn't work: lst = {4, 5, 6}; test[lst, 99]; lst gives {4,5,6} However, test[list_, val_] := list[[2]] = val works. Similarly, Clear[foo]; Remove[foo]; SetAttributes[foo, HoldAll] foo[list_List] := list[[2]]; lst={1,2,3}; foo[lst] doesn't work. Can someone explain why HoldAll changes th...

Re: strange difference in behavior batch vs interactive
Toby, In response to your original question, one additional major difference between batch and interactive is that, in interactive mode, you may already have created some of the files and/or set some of the macro variables prior to when you ran your test program. HTH, Art ------------- On Thu, 7 Sep 2006 10:13:59 -0700, toby989@HOTPOP.COM wrote: >Then, can I change the replace/noreplace system option? I tried to set the >option replace in my sas code that I am running batch, but it hadnt had an effect. >Does it help to copy the configuration file into the directory from which I >...

Strange behavior using IPTables / Squid / Windows Clients.
Our windows client's arp tables are changing mac addresses for the firewall starts up a transparent squid server. Windows client: Before starting transparent proxy server: 00-07-e9-da-3b-79 A while after starting transparent proxy server: 00-01-02-78-70-ea The firewall has a public address and private ip address. The problem is when the arp table changes, the clients then points to the wrong ip address. All of this is solved when I turn of transparent routing to the squid server. --JP ...

Strange Win 7 behavior using ComDlg32.OCX
I have written an Outlook addin that uses ComDlg32.OCX to pop the Font = dialog.=20 A few (very few) users report that when they click the button to pop the = font dialog all they see is a flicker or flash indicating something happened = but no dialog is presented. It seems they are all Win 7 users and I believe = mostly using Outlook version 2010. I had been using the API method sample code from Randy Birch's http://vbnet.mvps.org/ when I initially got the bug reports and decided = to switch to the common dialog ocx in case I wasn't implementing the API = method properly. Same result - same people with the original problem. Using ComDlg32 Version 6.01.9816 'get hDC Printer.Print With CommonDialog1 .hDC =3D Printer.hDC .flags =3D cdlCFBoth Or cdlCFEffects .CancelError =3D True .ShowFont End With Printer.KillDoc If Err =3D cdlCancel Then Exit Sub With CommonDialog1 AddrText.FontName =3D .FontName AddrText.FontSize =3D .FontSize and so on... In my Inno script I install the file using the following (ignore the = linebreak) Source: c:\vbfiles\sp6\ComDlg32.OCX; DestDir: {sys}; Flags: = restartreplace sharedfile regserver Any ideas? Thanks -mike FWIW, I've been using the API version from vbAccelerator for years, and works under w7. www.vbaccelerator.com "-mhd" <not_real@invalid.com> wrote in message news:7uf74813tpaeqrtk9ujae8gd191sbbnvmt@4ax.com... I have written an Out...

Shorcut vs. Direct Opening of Database--Strange Behavior
Was wondering what the explanation for this could be in Access 2003. When a user opens particular database on the network with a desktop shortcut (shortcuts are over a year old), they would receive the "the document caused a serious error the last time it was opened...." However, when they browse to the mdb file and double click to open, they don't receive the error message and the database works fine???? I noticed some users have SP1, and others have SP2. This behavior was happening on all computers regardless of SP version. What could cause this? Thanks! On Mar 12, 1:08=A0pm, WPW07 <wwisnie...@gmail.com> wrote: > Was wondering what the explanation for this could be in Access 2003. > > When a user opens particular database on the network with a desktop > shortcut (shortcuts are over a year old), they would receive the "the > document caused a serious error the last time it was opened...." > > However, when they browse to the mdb file and double click to open, > they don't receive the error message and the database works fine???? > > I noticed some users have SP1, and others have SP2. =A0This behavior was > happening on all computers regardless of SP version. > > What could cause this? > > Thanks! make sure the correct access.exe file is called in the short cut and if noen is explicitly called either call the correct one or ensure the correct one is associated with the .mdb files. ...

Strange behavior using nested catch handlers and return
Hello, A colleague of mine has just stumbled across some really strange Tcl behavior that runs counter to the what the documentation says. Look at the following code snippet. ################################################### proc test {} { if { [ catch { if { [ catch { error "dammit!" } result ] } { puts "inner catch fired: $result" return "123" } } theResult ] } { puts "outer catch fired: $theResult" } } test ################################################### The inner catch is guaranteed to fire, since we explicitely raise an error there. Upon catching the error, we return "123". I'd expect this return to take us straight out of the test() procedure. At least this is what return does according to the Tcl documentation: __QUOTE__ Return immediately from the current procedure (or top-level command or source command), with string as the return value. If string is not specified then an empty string will be returned as result. __UNQUOTE__ However, what really happens is that return does __NOT__ cause us to exit from the procdure but instead causes the outer catch to fire, too, with "123" becoming the error code! Has my colleague discovered a Tcl bug or is this working as designed (if it is, the documentation of the Tcl return command should probably be clarified). Cheers, ant antred wrote: > However, what really happens is that return does __NOT__ cause us to > exit from the...

strange (and orrible) behavior in gtk.CellRendererCombo using pygtk
Hi folks! I notice a strange (and orrible) behavior in gtk.CellRendererCombo. My code work trapping the 'edited' signal to store in a temporary buffer before the "save all" operation (by clicking a save-button). The is that gtk.CellRendererCombo (unlike gtk.CellRendererEntry, and others...) dont emit the 'edited' signal when the user click on a widget outside the gtk.TreeView, but only clicking on another cell in same TreeView. It's possible? There's a good reason? thak's a lot tiziano ...

Tkinter: Strange behavior using place() and changing cursors
I was trying to design a widget that I could drag and drop anywhere in a frame and then resize by pulling at the edges with the mouse. I have fiddled with several different approaches and came across this behavior when using the combination of place() and configure(cursor = ...) This problem doesn't occur if you remove either one of these elements. It's a very basic design of a button wrapped in a sizer frame and is supposed to work like any window that can be resized. The mouse will change into a resize cursor when it hits the sizer frame (button's edge). However when the cursor...

run-time vs compile-time
I have hard time to understand run-time environment. Let assume that I have a program that has a simple variable alpha. When this variable is statically allocated, the compiler can use the absolute address of alpha to access to it. What confuses me is that when the variable is dynamically allocated, how does the compiler implement it? We know the address of the variable until run-time. During the compilation, how can we access to the alpha variable since we don't know its address yet? Thanks in advance "newbiecpp" <newbiecpp@yahoo.com> wrote in message news:u9F%c.5283$dC4.1197@trndny06... > I have hard time to understand run-time environment. Let assume that I have > a program that has a simple variable alpha. When this variable is > statically allocated, the compiler can use the absolute address of alpha to > access to it. What confuses me is that when the variable is dynamically > allocated, how does the compiler implement it? We know the address of the > variable until run-time. During the compilation, how can we access to the > alpha variable since we don't know its address yet? > > Thanks in advance > > You assumption about the "statically allocated" variable is incorrect. The compiler has no idea where in memory the entire program will be loaded, so no "absolute address" can be given. How a variable is addressed depends greatly on where it is declared, not just on whether new ...

Strange behavior
Why if, f.e., if I write in the page: var r = (document.referrer).toLowerCase(); var p = r.split("middle")[1]; document.write("-->"+p); it works but if I put this script in an external script and insert into multiple pages with <script src="my.js"></script> it doesn't? Help appreciated. Regards. -- Fabri ("Sono pi� di 30 punti...ma � come se fossere 8 o 9....") The code is fine, so long there's a document.referrer you can grab off the window.history stack, document.referrer returns the previous url in the history o...

Web resources about - Strange behavior in run-time vs. dbx behavior when using shmget - comp.unix.aix

Behavior - Wikipedia, the free encyclopedia
Behavior or behaviour (see spelling differences ) is the range of actions and mannerisms made by individuals, organisms , systems , or artificial ...

Behavior Design - behaviordesign.com
Behavior designs interactive systems.

Behavior Gap - Exploring the relationship between people and their money. Behavior Gap
Watch it now. Watch the latest videos by Carl Richards on money, emotion, and meaningful conversations.

Dog Behavior Tips -Dog Owners One Stop Shop and Tips
Come and get some free dog behavior tips. Training your new or older dog can sometimes be somewhat of a task if you are new to doing it. Let ...

Modeled Behavior
A quick announcement: we’ve moved the blog to Forbes. You’ll be able to find us there at blogs.forbes.com/modeledbehavior , and soon modeledbehavior.com ...

Online Behavior - Marketing Measurement & Optimization
This website is a source of knowledge for website owners and analysts looking to understand how their online customers behave . But that's not ...

BJ Fogg's Behavior Model
... In addition, he devotes at least half his time to industry projects and innovations, all of which focus on using technology to change behaviors ...

Plant Behavior
The Society of Plant Signaling and Behavior serves the community of scientists interested in sensory plant biology, signaling, information processing ...

Lawyers Say They Have Emails Showing JWT Was Told About Exec's Behavior
Lawyers for JWT Chief Communications Officer Erin Johnson say they have an email exchange documenting their client's attempts to alert the agency ...

Report: Bots Are Getting More Sophisticated and Mimic Human Behavior Online
... and CEO Rami Essaid noted in a statement that Advanced Persistent Bots were becoming a much bigger problem. APBs can mimic human behavior, load ...

Resources last updated: 3/26/2016 11:12:10 PM