Description: Fix Ctrace::clear off-by-half clearing complex trace
 Ctrace stores each complex element as a pair of t_real in p_vtab of
 size 2*d_size.  clear() only zeroed the first d_size entries, leaving
 the imaginary parts (and later elements) as uninitialized memory.
 This makes a freshly allocated Ctrace read back garbage through
 nlget() and fail the nil-p predicate (assert true (ct:nil-p) in
 MTH0704.als) whenever the allocator hands over non-zero memory.  Zero
 the full 2*d_size array.
Author: tangxiaofeng <tangxiaofeng@kylinos.cn>
Origin: other
Forwarded: not-needed
Last-Update: 2026-08-27

--- afnix-3.8.0.orig/src/mod/mth/shl/Ctrace.cpp
+++ afnix-3.8.0/src/mod/mth/shl/Ctrace.cpp
@@ -335,7 +335,7 @@ namespace afnix {
   void Ctrace::clear (void) {
     wrlock ();
     try {
-      for (t_long k = 0; k < d_size; k++) {
+      for (t_long k = 0; k < 2*d_size; k++) {
 	p_vtab[k] = 0.0;
       }
       unlock ();

