• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Bizarre x86 segment layout problem causing select() slowdown: solved, sort of
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bizarre x86 segment layout problem causing select() slowdown: solved, sort of


  • Subject: Re: Bizarre x86 segment layout problem causing select() slowdown: solved, sort of
  • From: Dave Hayden <email@hidden>
  • Date: Wed, 7 Feb 2007 11:22:38 -0800

On Feb 7, 2007, at 10:56 AM, glenn andreas wrote:

On Feb 7, 2007, at 12:49 PM, Jonas Maebe wrote:

setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (void*)32768, sizeof(int));

Shouldn't you pass the address of a variable containing the buffer size rather than the actual value? Have you tried checking the return value of that call?


It's still a bug of course if behaviour randomly changes depending on which erroneous parameter you pass (maybe the kernel doesn't deal gracefully with a wrong parameter there and uses an uninitialised value in case it's invalid).


32768 ends up being smack in the middle of the __TEXT segment, so whatever is at that address is part of the program. Thus adding dummy routines will change what part of the program that points to, and thus alter the behavior.

Yeah, and when it's at that "magic" value, the contents of (int*) 32768 is 583, what I was seeing returned from read().


Well, I'm going to go crawl under a rock now.. Thanks for your help, everyone.

-D

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Bizarre x86 segment layout problem causing select() slowdown: solved, sort of
      • From: Steve Sisak <email@hidden>
References: 
 >Bizarre x86 segment layout problem causing select() slowdown (From: Dave Hayden <email@hidden>)
 >Re: Bizarre x86 segment layout problem causing select() slowdown (From: Eric Albert <email@hidden>)
 >Re: Bizarre x86 segment layout problem causing select() slowdown (From: Dave Hayden <email@hidden>)
 >Re: Bizarre x86 segment layout problem causing select() slowdown (From: John Daniel <email@hidden>)
 >Re: Bizarre x86 segment layout problem causing select() slowdown (From: Dave Hayden <email@hidden>)
 >Re: Bizarre x86 segment layout problem causing select() slowdown (From: John Daniel <email@hidden>)
 >Re: Bizarre x86 segment layout problem causing select() slowdown (From: Dave Hayden <email@hidden>)
 >Re: Bizarre x86 segment layout problem causing select() slowdown (From: John Daniel <email@hidden>)
 >Re: Bizarre x86 segment layout problem causing select() slowdown (From: John Daniel <email@hidden>)
 >Re: Bizarre x86 segment layout problem causing select() slowdown (From: Shawn Erickson <email@hidden>)
 >Re: Bizarre x86 segment layout problem causing select() slowdown (From: Dave Hayden <email@hidden>)
 >Re: Bizarre x86 segment layout problem causing select() slowdown (From: Eric Albert <email@hidden>)
 >Re: Bizarre x86 segment layout problem causing select() slowdown (From: Dave Hayden <email@hidden>)
 >Re: Bizarre x86 segment layout problem causing select() slowdown: solved, sort of (From: Dave Hayden <email@hidden>)
 >Re: Bizarre x86 segment layout problem causing select() slowdown: solved, sort of (From: Jonas Maebe <email@hidden>)
 >Re: Bizarre x86 segment layout problem causing select() slowdown: solved, sort of (From: glenn andreas <email@hidden>)

  • Prev by Date: Re: com.yourcompany
  • Next by Date: How do I get #pragma mark behavior in a Python script?
  • Previous by thread: Re: Bizarre x86 segment layout problem causing select() slowdown: solved, sort of
  • Next by thread: Re: Bizarre x86 segment layout problem causing select() slowdown: solved, sort of
  • Index(es):
    • Date
    • Thread