Tuesday, October 6, 2009

คำสำคัญ

(static)
�� อาจใช้ Tool ช่วยตรวจวิเคราะห์ เอกสารและโปรแกรม code
(dynamic)
�� ใช้ข้อมูลทดสอบระบบและสังเกตผลการทำงาน

event-based อันนี้อาจารย์ ดร.อุษา อธิบายซะเข้าใจเลย
คือเกิดเหตุการณ์ตามเงื่อนไขก่อนค่อยทำ ไม่ต้องเช็คทุกครั้งว่ามีการเปลี่ยนแปลงอะไรไปบ้าง

state-based งงอยู่นาน..ตอนนี้จะงงต่อไปรึป่าว
คือเช็คในเวลาที่มีการเปลี่ยนสถานะ

False Positive
เกิดขึ้นเมื่อระบบได้ระบุว่าการกระทำหนึ่งเป็นการบุกรุกแต่ที่แท้แล้วไม่ใช่

<< เอาไว้ศึกษาก่อนเรียน >>

Common types of computer bugs

* Conceptual error (code is syntactically correct, but the programmer or designer intended it to do something else)

# Maths bugs

* Division by zero
* Arithmetic overflow or underflow
* Loss of arithmetic precision due to rounding or numerically unstable algorithms

# Logic bugs

* Infinite loops and infinite recursion

# Syntax bugs

* Use of the wrong operator, such as performing assignment instead of equality test. In simple cases often warned by the compiler; in many languages, deliberately guarded against by language syntax

# Resource bugs

* Null pointer dereference
* Using an uninitialized variable
* Off by one error, counting one too many or too few when looping
* Access violations
* Resource leaks, where a finite system resource such as memory or file handles are exhausted by repeated allocation without release.
* Buffer overflow, in which a program tries to store data past the end of allocated storage. This may or may not lead to an access violation. These bugs can form a security vulnerability.
* Excessive recursion which though logically valid causes stack overflow

#Co-programming bugs

* Deadlock
* Race condition
* Concurrency errors in Critical sections, Mutual exclusions and other features of concurrent processing. Time-of-check-to-time-of-use (TOCTOU) is a form of unprotected critical section.

# Teamworking bugs

* Unpropagated updates; e.g. programmer changes "myAdd" but forgets to change "mySubtract", which uses the same algorithm. These errors are mitigated by the Don't Repeat Yourself philosophy.
* Comments out of date or incorrect: many programmers assume the comments accurately describe the code
* Differences between documentation and the actual product

[[อ่านที่นี่]]