Ignore:
Timestamp:
Apr 20, 2007, 1:47:42 AM (18 years ago)
Author:
bdash
Message:

2007-04-20 Mark Rowe <[email protected]>

Reviewed by Maciej.

Fix bogus optimisation in the generic pthread code path.

  • kjs/collector.cpp: (KJS::currentThreadStackBase):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/collector.cpp

    r20970 r20971  
    237237#elif PLATFORM(UNIX)
    238238    static void *stackBase = 0;
     239    static size_t stackSize = 0;
    239240    static pthread_t stackThread;
    240241    pthread_t thread = pthread_self();
     
    249250        pthread_getattr_np(thread, &sattr);
    250251#endif
    251         size_t stackSize;
    252252        int rc = pthread_attr_getstack(&sattr, &stackBase, &stackSize);
    253253        (void)rc; // FIXME: deal with error code somehow?  seems fatal...
    254254        ASSERT(stackBase);
    255255        pthread_attr_destroy(&sattr);
    256         return (void*)(size_t(stackBase) + stackSize);
    257256        stackThread = thread;
    258257    }
     258    return (void*)(size_t(stackBase) + stackSize);
    259259#else
    260260#error Need a way to get the stack base on this platform
Note: See TracChangeset for help on using the changeset viewer.