digitalmars.D - Proposal: User Code Bug Tracking
- dsimcha (27/27) Nov 24 2010 There's been a lot of discussion on this newsgroup about improvements th...
- Michal Minich (11/12) Nov 25 2010 Signed/unsigned comparison and arithmetic
- Jason House (3/49) Nov 25 2010 My last bug bug was closest to either memory corruption or misuse of dru...
- Kagamin (2/4) Nov 25 2010
- Kagamin (2/5) Nov 25 2010 I notice, every time I write in D I end up filing bugs in bugzilla...
- Jonathan M Davis (4/10) Nov 25 2010 Too true.
There's been a lot of discussion on this newsgroup about improvements that can be made to D to prevent bugs. The problem is that noone really has stepped back and looked at what the biggest causes of bugs in D are. I therefore propose that we create a website where people can post a few basic details about non-trivial bugs they encountered and fixed in their D2 code. (Non-trivial bugs are defined as bugs that took more than a few minutes worth of effort to discover, diagnose and fix.) The simplest version might just be something like: The root cause of my last D2 bug was closest to: Integer overflow Signed/unsigned comparison Null pointers Floating point precision issues Unsafe casts Memory corruption Violation of implicit function preconditions Violation of explicit (using contracts) function preconditions Violation of implicit struct/class invariants Violation of explicit (using contracts) struct/class invariants Off-by-one errors Misunderstanding of Phobos/druntime API Misunderstanding of a third-party library API Concurrency issues Otherwise incorrect function calls (arguments in wrong order, wrong overload called, etc.) User input cases I hadn't considered Other high-level logic errors not related to any of the above
Nov 24 2010
V Thu, 25 Nov 2010 01:32:36 +0000, dsimcha wrote:The root cause of my last D2 bug was closest to:Signed/unsigned comparison and arithmetic see http://www.digitalmars.com/d/archives/digitalmars/D/learn/ Mixing_operations_with_signed_and_unsigned_types_20347.html to work around this bug, and get error at compile time you can create template for built in operators (< + - /): as 'lt' mentioned in the archived post, and use: lt(a, b) instead of a < b. If it were not possible to make such templates, I would be hunting bugs in my sometime wrong/sometime not calculations to this day. It is quite hard to avoid using unsigned types, especially when you are using auto.
Nov 25 2010
My last bug bug was closest to either memory corruption or misuse of druntime API. Mix in that it only happened with concurrency, it involved a poorly understood 3rd party API (C++ code), and awful gdb support, and you have a mix that has soured me on D development to this day! This was in a project that fully embraced shared. I did not add in the 3rd party library until after it worked with 2 other API's already (one using D and another using C++). It took me over a month to track down, and turned out that the root cause was a bug I had filed months before I hit the issue! dsimcha Wrote:There's been a lot of discussion on this newsgroup about improvements that can be made to D to prevent bugs. The problem is that noone really has stepped back and looked at what the biggest causes of bugs in D are. I therefore propose that we create a website where people can post a few basic details about non-trivial bugs they encountered and fixed in their D2 code. (Non-trivial bugs are defined as bugs that took more than a few minutes worth of effort to discover, diagnose and fix.) The simplest version might just be something like: The root cause of my last D2 bug was closest to: Integer overflow Signed/unsigned comparison Null pointers Floating point precision issues Unsafe casts Memory corruption Violation of implicit function preconditions Violation of explicit (using contracts) function preconditions Violation of implicit struct/class invariants Violation of explicit (using contracts) struct/class invariants Off-by-one errors Misunderstanding of Phobos/druntime API Misunderstanding of a third-party library API Concurrency issues Otherwise incorrect function calls (arguments in wrong order, wrong overload called, etc.) User input cases I hadn't considered Other high-level logic errors not related to any of the above
Nov 25 2010
dsimcha Wrote:Signed/unsigned comparisoninteger promotion http://d.puremagic.com/issues/show_bug.cgi?id=2809Misunderstanding of a third-party library API
Nov 25 2010
dsimcha Wrote:There's been a lot of discussion on this newsgroup about improvements that can be made to D to prevent bugs. The problem is that noone really has stepped back and looked at what the biggest causes of bugs in D are.I notice, every time I write in D I end up filing bugs in bugzilla...
Nov 25 2010
On Thursday 25 November 2010 05:50:12 Kagamin wrote:dsimcha Wrote:Too true. Perhaps not _every_ time, but it does happen quite often. - Jonathan M DavisThere's been a lot of discussion on this newsgroup about improvements that can be made to D to prevent bugs. The problem is that noone really has stepped back and looked at what the biggest causes of bugs in D are.I notice, every time I write in D I end up filing bugs in bugzilla...
Nov 25 2010