Can arguments be corrupted on passing in to function?

Hello,
I'm seeing something that's got me stumped. Maybe you folks can advise.
What appears to be a valid arguments are getting corrupted when passed to a different function.
Here is my set up:
- LibA.a
- LibB.a
- SampleApp
- MyApp
The bad function call is going from LibA in to LibB.
LibA, LibB and SampleApp have all been pre-complied (thankfully in debug mode) by an older version of Sun Studio on Solaris x86/64. SampleApp uses both LibA and LibB and runs just fine on my system.
MyApp uses both LibA and LibB in a manner similar to SampleApp. Yet, MyApp crashes due to this pointer corruption.
When single stepping the code, I see the pointer in the caller being valid and being passed as a parameter. In the callee, the value of the passed-in parameter pointer in simply wrong.
Note: The caller is in the pre-compiled LibA.a and the callee is in the pre-compiled LibB.a I'm never even touching that code to recompile it. Further, the code itself must be correct since SampleApp uses those functions, and runs fine.
Thus, I'm thinking that my error is in the linking stage, but I'm not sure what it could be.
Any ideas?
Thank you,
David
Edited by: 878694 on Aug 11, 2011 3:52 PM

It's impossible to say what is wrong without a fairly complete example, preferably one that could be compiled and run to see the problem. Some generic guesses:
1. Compiler bug. The code should be recompiled with a new compiler where the bug has been fixed. Impossible to say what sort of bug that might be without a test case.
2. As in my original comment, the two libraries see inconsistent declarations. For example, after one library was built, a declaration in a common header was changed and the other library, or some binary in it, was built using the different declaration. This kind of error is common when makefiles do not express all the needed dependencies. The fix is to delete all binaries and recompile everything (to be sure no change is missed).
2a. A related error is when common declarations are repeated in .cc files instead of being placed only in header files and included where needed. What are supposed to be identical declarations get out of sync. The fix is to reorganize the source code to eliminate copies of declarations, delete all binaries and recompile everything (to be sure no change is missed).
3. You are not seeing what you think you are seeing. For example, if the address of a derived class is passed to a pointer-to-base-class, the address might need to be adjusted. In this case, the difference in values is correct, and something else is causing whatever incorrect program behavior you see.

Similar Messages

  • Can I pass a table function parameter like this?

    This works. Notice I am passing the required table function parameter using the declared variable.
    DECLARE @Date DATE = '2014-02-21'
    SELECT
    h.*, i.SomeColumn
    FROM SomeTable h
    LEFT OUTER JOIN SomeTableFunction(@Date) I ON i.ID = h.ID
    WHERE h.SomeDate = @Date
    But I guess you can't do this?... because I'm getting an error saying h.SomeDate cannot be bound. Notice in this one, I am attempting to pass in the table function parameter from the SomeTable it is joined to by ID.
    DECLARE @Date DATE = '2014-02-21'
    SELECT
    h.*, i.SomeColumn
    FROM SomeTable h
    LEFT OUTER JOIN SomeTableFunction(h.SomeDate) I ON i.ID = h.ID
    WHERE h.SomeDate = @Date

    Hi
    NO you cant pass a table function parameter like this?
    As When you declare @date assign value to it and pass as a parameter it will return table which you can use for join as you did it in first code 
    But when you pass date from some other table for generating table from your funtion it doesnt have date as it is not available there
    Ref :
    http://www.codeproject.com/Articles/167399/Using-Table-Valued-Functions-in-SQL-Server
    http://technet.microsoft.com/en-us/library/aa214485(v=sql.80).aspx
    http://msdn.microsoft.com/en-us/library/ms186755.aspx
    https://www.simple-talk.com/sql/t-sql-programming/sql-server-functions-the-basics/
    http://www.sqlteam.com/article/intro-to-user-defined-functions-updated
    Mark
    as answer if you find it useful
    Shridhar J Joshi Thanks a lot

  • I have a short 3d video with a separate black/white alpha pass, how can I use the alpha pass as a mask?

    I have a short 3d video with a separate black/white alpha pass, how can I use the alpha pass as a mask? I want to add a heat wave distortion to the whole video but not on the alpha pass area. How do I set this up?

    Track matte:
    http://helpx.adobe.com/after-effects/using/alpha-channels-masks-mattes.html#track_mattes_a nd_traveling_mattes
    Start here to learn After Effects:
    http://adobe.ly/AE_basics

  • How can i change the restrictions pass code

    How can i change the restrictions pass code

    Disable restrictions, then re-enable such. You'll be prompted for a new passcode.

  • HT4993 my phone repeat the same song all the time, and i want to know what can i do to automatic pass to others songs

    my phone repeat the same song all the time, and i want to know what can i do to automatic pass to others songs

    You probably have Repeat turned on.  While playing the song, tap the cover art to reveal the additional music controls (see photo below).  Tap the Repeat control  on the bottom left until it turns white (white is off, blue is on).

  • How can I fix corrupted audiobooks category--plays too fast and is gravelly?

    How can I fix corrupted audiobooks category--plays too fast and is gravelly? Other music categories are unaffected..

    On the audio book (and podcast) playing screen there is a playback speed selector. It is the box on the right hand side of the screen right below the scrubber bar. It say either 1/2X, 1X or 2X, the playback speeds. Tap the box to cycle through the playback speeds.

  • I forgot my passcode and now i am locked out...is there a way i can request to have the pass code un locked by sending it to my email trhat is registered with Apple?   what to do?

    I forgot my passcode to my iphone...what an i do?

    s there a way i can request to have the pass code un locked by sending it to my email trhat is registered with Apple?
    No
    what an i do?
    Restore your phone and set it up from scratch.

  • Pavilion223 All in One-Can't dowload my boarding pass.

    Can't download my boarding pass. Note says Adobe Flash not installed "click here to install" (which I did).  Further note said Adobe Flash already installed in Widows 8. Now what???  This is a sudden problem - only 2 wks ago I  got a boarding pass with no problem.

    Dunidar, Thanks for your response and, hopefully, your help. However, if you are responding on behalf of HP Customer Service, you should know I was told by HPCS that my computer is out of warranty (by a couple of months) and I would have to pay for tech support . I can't afford the tech charges for the next year nor the cancellation fee if I discontinue service before the year is up.  That's my sad tale.
    If you can help, the product no is 23b034; running on Windows 8 -64 bits. Thank you.

  • In i Photo I can not in put my pass word?

    Can any one help? When in I Photo I wanted to share and send by e-mail. this I did and was asked to input my pass word this was done by using the always check pass word automaticly. Since I did this and the pass word was incorrect I can not go into the pass word box to correct again How do I open the box again?

    Photos can only be sorted manually in albums.  So select the photos you want to sort and create an album with them.  Then you can sort them as needed. 

  • My iPad Air is locked (my brother change the code, so I don't know it) and is not connected to the internet, in more Find my iPhone is activate, so what i can do to find the pass code?

    My iPad Air is locked (my brother change the code, so I don't know it) and is not connected to the internet, in more Find my iPhone is activate, so what i can do to find the pass code? Help me please!

    In iTunes, select iTunes Store under STORE, scroll to the bottom and change the flag (bottom right) to the country where you are.

  • HT201304 How can I get my restrictions pass code without doing a factory restore?

    How can I get my restrictions pass code without doing a factory restore?

    You cannot:
    Locked Out, Forgot Lock or Restrictions Passcode, or Need to Restore Your Device: Several Alternative Solutions
    A
    1. iOS- Forgotten passcode or device disabled after entering wrong passcode
    2. iPhone, iPad, iPod touch: Wrong passcode results in red disabled screen
    3. Restoring iPod touch after forgotten passcode
    4. What to Do If You've Forgotten Your iPhone's Passcode
    5. iOS- Understanding passcodes
    6. iTunes 10 for Mac- Update and restore software on iPod, iPhone, or iPad
    7. iOS - Unable to update or restore
    Forgotten Restrictions Passcode Help
                iPad,iPod,iPod Touch Recovery Mode
    You will need to restore your device as New to remove a Restrictions passcode. Go through the normal process to restore your device, but when you see the options to restore as New or from a backup, be sure to choose New.
    You can restore from a backup if you have one from BEFORE you set the restrictions passcode.
    Also, see iTunes- Restoring iOS software.

  • HT2736 Can I give a season pass as a gift?

    Can I give a season pass as a gift?  It appears that I can give the specific episodes of a show, but not a season pass to the show.  If I cannot give a season pass, why not?  Is there some reason Apple will let me buy one for myself, but not someone else (apart from 'we dropped the ball')?

    Yes you can switch. Don't let anybody tell you otherwise, I just changed from Canada to US even though I had an active season pass and iTunes Match. Call Apple support and they will help you: http://support.apple.com/kb/HE57
    My season pass and Match account have been cancelled by the way, I have to pay again to re-open these.

  • How can I disable setting a pass code?

    How can I disable setting a pass code? If the students figure out, they are able to set it up.. they will! Help!

    Disable restrictions, then re-enable such. You'll be prompted for a new passcode.

  • My phone needs a restore but I can not because my pass code is active. It only allows me to go to the emergency call screen. I can't type in my pass code What should I do?

    My phone needs a restore but I can not because my pass code is active. It only allows me to go to the emergency call screen. I can't type in my pass code What should I do?

    Thank you so much I actually did have restrictions enabled. Ur too sweet thanks again for your help

  • HT1533 My MacBook Pro fell and now when I turn it on its stuck at the apple logo screen with a loading circle underneath it. What can I do to get passed this?

    My MacBook Pro fell and now when I turn it on its stuck at the apple logo screen with a loading circle underneath it. What can I do to get passed this?

    Sounds like something internal was damaged in the fall, probably the disk drive. Take to Apple and ask them to fix it.
    Allan

Maybe you are looking for

  • Moving average price of the material is negative

    Hi GUrus, Can anybody please expklain me why we get the moving average price of the material to be negative. PLz xplain with an example clearly. Thanks in advance Thanks Anusha

  • Help With Dynamic PL/SQL LOV Syntax

    Hello I am trying to create a dynamic pl/sql lov in Oracle Apex 3.2 on 11g. I am having some issues with the syntax of the statements below and I'd appreciate any suggestions. DECLARE BEGIN IF :p3_current_a_workshop != 0 THEN RETURN 'select distinct

  • Security settings and problems

    Hi there, I need my new airport express set at WEP (because one computer in the house is old and cannot connect with a WPA). However, when I manually set my airport to WEP, I cannot connect other computers to the network. I tried no security--the sam

  • Vendor Return Scenario  and movement type

    Hi , My Client is creating a third party Po for  Netwok and Project System .(ie.vendor is Delivering material to Customer Directly ) . Now Some material is retrun back customer .and my client want to return this material to vendor . Sales Return Proc

  • How tdo I get rid of Explorer Image Pop Up

    Does anyone know how to get rid of the little pop up window that appears in Explorer when someone rolls over an image and leaves there cursor there for a while.