Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

Developers and testers are obsessed with ensuring (or avioding) the reentrancy. Organizations always analyze it specially (e.g. this one says: Many functions must complete their execution and return before they're called again, in order to avoid problems). But what is so specific about it?

Actually, I can reenter in two ways: by (single-threaded) recursion and simultaneously, using two parallel threads. Why nobody tells about this or can say which of the cases is considered in the reentrancy issue? The wikipedia article starts by ISR (which seem a kind of multi-threading), then continues with recurrence and then finishes introduction mentioning multi-threading.

Ok, recurrence can be a problem. There can be stack overflow and we can forget to exit the loop in some cases. But why to call this re-entrancy problem?

Multithreading has nothing to do with this. Mulththreading analysis concentrates around use of shared resourses. Yes, re-entrant function, executed simultaneously by two threads, will access the same global (shared) variable and care must be taken. But executing two different procedures simultaneously may also result in the same problem because the same global variable is not limited for access from this single (reentrant) procedure. Producer and consumer call different procedures. Why do not want you to do the same analysis for this case and use critical sections only in reentrant procedures? If you do not enclose your shared variable access to reentrant procedures (and nobody does) then why to treat them differently?

IMO, the recurrence and atomic access to shared objects in multithreading are two absolutely different problems, which have nothing to do with each other. Different analysis techniques are used to analyze them you must think differently when address them. Why to repeat these two analyses under the reentrancy pretext? What if I copy my function and one will call another or these sister functions will be called simultaneously? What if functions are not exact copies of each other? Can I overcome the reentrancy problem this way?

share|improve this question

closed as off topic by testerab Apr 23 '13 at 21:49

Questions on Software Quality Assurance & Testing Stack Exchange are expected to relate to software quality assurance or testing within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Hi Val - this doesn't appear to be on topic for SQA - would you like us to try to migrate this to a more suitable site? Not sure where to suggest at the mo. –  testerab Apr 23 '13 at 21:51
    
Can you explain how quality/code reliability ensurence issue may be not related with quality assurance? I have re-posted it in codereview.stackexchange.com/questions/25408/… –  Val Apr 24 '13 at 7:19
2  
It is related to programming in general, and not specifically a Testing or SQA. I suppose programmers SE would be a better place –  Suchit Parikh Apr 24 '13 at 20:18

Browse other questions tagged or ask your own question.