Update README.md
Browse files37 unmodified lines383940414243444546474849505137 unmodified lines- `POST /mcp` – minimal MCP endpoint## Tasks| Difficulty | Bug Type ||------------|----------|| easy | Missing null check || medium | Inefficient loop || hard | Division by zero || harder | Race condition (missing lock) || hardest | Potential deadlock |## Deployment37 unmodified lines383940414243444546474849505152535455565758596061626364656667686970717273747576777837 unmodified lines- `POST /mcp` – minimal MCP endpoint## TasksEasy (null‑checks, simple logic errors)# Bug ID Description How to inject1 null_check Missing if key in dict: guard AST: remove if‑statement2 simple_typo Variable name misspelled (users → usres) AST: rename variable3 string_index Indexing string with wrong index (off‑by‑one) AST: change constant in index4 default_value Not providing a default in dict.get() AST: replace dict[key] with dict.get(key) … but wrongly5 empty_return Function returns None in a branch that should return something AST: insert return None or delete a returnMedium (off‑by‑one, loop logic, simple arithmetic)# Bug ID Description How to inject6 off_by_one range(x) → range(1, x-1) (skips first and last) AST: modify range args7 loop_skip for i in range(len(arr)): missing last element because of off‑by‑one AST: change range length8 sign_error sum += item replaced with sum -= item AST: swap Add/Sub9 swap_args Calling a function with arguments swapped AST: swap arg order10 uninitialised_var Using a variable before assignment in a loop AST: remove assignment lineHard (division‑by‑zero, floating‑point, edge‑case handling)# Bug ID Description How to inject11 division_by_zero_empty Missing check for empty list before averaging AST: remove the if not data: guard12 division_by_zero_zero Integer division where denominator can be zero AST: remove a denominator‑checking statement13 float_precision Using integer division // instead of / for average AST: change operator14 abs_usage Forgetting abs() when comparing differences AST: remove abs() call15 round_error Rounding too early causing precision loss AST: insert round() incorrectlyHarder (race conditions, missing atomic operations)# Bug ID Description How to inject16 missing_lock Shared counter accessed without a lock Template: remove with lock: from code17 double_lock Acquiring the same lock twice (deadlock risk) Template: add extra lock.acquire()18 global_nonatomic Compound assignment x = x + 1 instead of atomic += AST: modify assignment node19 thread_safe_list Appending to a list from multiple threads without lock Template: remove lock around list operation20 volatile_read Reading a shared flag outside a lock Template: remove synchronization blockHardest (deadlock, ordering, complex concurrency)# Bug ID Description How to inject21 deadlock_order Lock A then lock B in one thread, opposite in another Template: swap lock acquisition order22 nested_lock_timeout Not using a timeout when acquiring locks, causing hang Template: replace acquire() with acquire(blocking=True) without timeout23 fork_join Starting threads and not waiting for them to finish (missing join()) AST: remove thread.join()24 mutex_release Releasing a mutex in one thread that was locked by another Template: wrong release logic25 race_on_init Initializing a shared resource after threads have started Template: move initialization after thread creation## Deployment
README.md+35-8