Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 6c6d37a7caf15bb62bf958c967dafdeb02ebb66d
Ticket: 3166410fffffffffffffffffffffffffffffffff
"out of stack space" on AIX
User & Date: nijtmans on 2011-01-28 15:06:06
Changes

  1. assignee changed to: "nijtmans"
  2. icomment:
    My guess is that on AIX there is a bug in pointer comparison, such that all pointers above the 2G are considered smaller than pointer below 2G. So, whenever two pointers are compared, one below and the other above the 2G border, the result is not correct. I see 2 possible solutions to this:
    
    - First substracting the two pointers results in a ptr_diff type,
      which is always signed. Then we can compare this to 0, and
      as long as no-one pushed more than 2G on the stack the
      result will be as expected. Well, 2G is an incredable
      amount, I don't think there is any machine with a total
      stack size as big a half the available memory.
    - Another solution would be to cast the pointers to
      (size_t) before the comparison, so:
    
           ((size_t)(localIntPtr) > (size_t)(iPtr)->stackBound)
    
      Then we simply correct AIX's comparison 'bug', but it
      looks more ugly ;-)
    
    I would prefer the first possibility, but someone might
    try to convince me otherwise. Anyone?
    
    
  3. login: "nijtmans"
  4. mimetype: "text/plain"
  5. username: "nijtmans"