Skip to content
Tcl Source Code Artifact [d7c3b22455]
Login

Artifact [d7c3b22455]

Artifact d7c3b224550c7d7f561bb5e33f517a38e23a1589:

Ticket change [d7c3b22455] - Ticket [746378ffffffffff|746378ffff] <i>experimental unix stack check patch...</i> status still Open with 5 other changes by mistachkin on 2003-06-01 11:24:49.
D 2003-06-01T11:24:49
J icomment \n\nFile\sAdded\s-\s51837:\sunixStackCheckV3.zip\n\nLogged\sIn:\sYES\s\nuser_id=113501\n\nBeen\sworking\son\sthis\spatch\sto\sfine\stune\sit\sa\sbit\smore.\n\nThe\sdefines\sstill\sneed\sto\sbe\smade\smore\sportable\sby\s\nusing\sconfigure.\n\nIn\smy\sopinion,\shere\sis\show\sit\sshould\swork:\n\nOn\sFreeBSD\swith\sthreads\senabled,\sthe\spthread\slibrary\s\nfunction\spthread_attr_get_np\sfunction\sshould\sbe\sused\s\nto\scheck\sthe\smaximum\sstack\ssize\sfor\seach\sthread.\s\sThe\s\nreason\sfor\sthis\sis\sthat\sgetrlimit\sfor\sRLIMIT_STACK\sis\s\nhorribly\sbroken\swhen\spthreads\sare\sused.\n\nOn\sFreeBSD\swith\sthreads\sdisabled,\sthe\sgetrlimit\sfunction\s\nshould\sbe\sused\sto\scheck\sthe\smaximum\sstack\ssize.\n\nSo\sfar,\son\sall\sother\stested\soperating\ssystems\s(Linux,\s\nSolaris,\sOpenBSD)\sit\slooks\slike\sthe\sgetrlimit\sfunction\s\nshould\sbe\sused,\sregardless\sof\swhether\sor\snot\sthreads\sare\s\nenabled.\n\nOn\sLinux,\sthere\sis\sa\sfunction\sthat\sis\scould\sbe\sa\sgood\s\ncandidate\sfor\schecking\sthe\smaximum\sstack\ssize,\s\npthread_getattr_np.\s\sHowever,\sit\sdoes\snot\sseem\sto\s\nreport\sthe\scorrect\sstack\ssize\s(at\sleast\son\sthe\sversion\sof\s\nLinux\sI\stested\son),\smaking\sit\sworse\sthan\suseless.\n\nPlease\snote\sthat\sthis\spatch\sis\sthread\ssafe\swhether\sor\snot\s\nit\suses\spthreads\sto\sget\sthe\sstack\ssize.\n\nI\sam\sunsure\sabout\sNetBSD\sand\sother\splatforms\snot\s\nmentioned\shere.\n\nIt\swould\salso\sbe\snice\sif\sthere\swas\sa\sway\sto\sexplicitly\s\nspecify\sthe\sstack\schecking\sbehavior\sfrom\sconfigure,\s\nsuch\sas\s--disable-stack-check\s(old\sway)\sand\s--enable-\nstack-check\s(new\sway),\setc.\n\n
J login mistachkin
J mimetype text/plain
J priority 7\sHigh
J username mistachkin
K 746378ffffffffffffffffffffffffffffffffff
U mistachkin
Z 0bf2b09761043e77f48c7cd61a754c77