Skip to content
Open

V2 #8

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
2ce5ae9
prepare to update
fengwang Aug 17, 2026
e7228e4
prepare to update
fengwang Aug 17, 2026
24c5621
move review report
fengwang Aug 17, 2026
92944c1
add upgrade blueprint: PRD, project contract, 6 session plans + contr…
fengwang Aug 17, 2026
83ea78d
fix blast radius
fengwang Aug 17, 2026
d34ffef
S1 pre-flight: phase docs (brainstorming/proposal/design/specs/tasks/…
fengwang Aug 17, 2026
40dc2c4
S1 evidence: baseline build + suite run (57 cases, 49.2M assertions, …
fengwang Aug 17, 2026
8a4323e
S1 C1: shrink_to_size copies the_cols_to_copy per row; shrink_to_size…
fengwang Aug 17, 2026
7b784fb
S1 C2: flipdim dim==2 swaps col against col; flipdim regression case …
fengwang Aug 17, 2026
b356840
S1 tasks 4-5: independent test-writer derivation concurs (fresh conte…
fengwang Aug 17, 2026
ad6fa79
S1 closeout: sharded review (0 Critical/High) + adversarial verificat…
fengwang Aug 17, 2026
0cbef65
S2 pre-flight: phase docs (interview/brainstorming/proposal/design/3 …
fengwang Aug 17, 2026
9d32d82
S2 task 2: 5 negative load_npy cases (TDD red pre-fix: SIGABRT x2, SI…
fengwang Aug 17, 2026
88c3740
S2 task 3: load_npy validated input boundary (S1 finding + 3rd hazard…
fengwang Aug 17, 2026
62a23cd
S2 closeout: sharded review (0 Critical/High; 2 Low fixed: bad-magic …
fengwang Aug 17, 2026
5c8fad9
S2 review fixes (F1/F2): bad-magic (16x0xAA) and zero-dim (0,2) pins …
fengwang Aug 17, 2026
9859e86
S3 pre-flight: phase docs, E05–E09 probes, pre-fix evidence (E05/E06/…
fengwang Aug 17, 2026
91d20e4
S3 task 1 (C3): fliplr/flipud to MATLAB/NumPy convention (fliplr=flip…
fengwang Aug 17, 2026
f819634
S3 task 2 (C4/R1): single pinv SVD-inversion core (svd_inverse: corre…
fengwang Aug 17, 2026
e0c57f6
S3 task 3 (P2): lu_decomposition partial pivoting (5-arg primary with…
fengwang Aug 17, 2026
316286f
S3 task 4 (C5/P2/P7): det() rewritten from Schur-complement recursion…
fengwang Aug 17, 2026
e2ac38d
S3 task 5 (C6): operator^ odd-exponent precedence bug — odd branch wa…
fengwang Aug 17, 2026
e674b07
S3 closeout: sharded review (4 shards PASS, 0 High/Critical; findings…
fengwang Aug 18, 2026
c3067cf
S4 pre-flight: phase docs, probes, pre-fix evidence
fengwang Aug 18, 2026
75bfecf
S4 task 1: C8 mean/variance/standard_deviation return double for real…
fengwang Aug 18, 2026
5caa7d2
S4 task 2: C9 conv same-mode accepts 1x1 (and any >= 1) kernels
fengwang Aug 18, 2026
f99fd6f
S4 task 3: C10 rref/gauss_jordan_elimination accept square systems
fengwang Aug 18, 2026
53a77fc
S4 task 4: P2 cholesky_decomposition returns bool with PD guard
fengwang Aug 18, 2026
c40b04b
S4 closeout: sharded review (0 Critical/High; 4 Low fixed: negative-i…
fengwang Aug 18, 2026
48763f4
session 5: refining phases complete (interview/brainstorming/proposal…
fengwang Aug 18, 2026
a971944
S5 task 1+2: E14 suite case (rand.hpp, 73->74 cases) + rand per-call …
fengwang Aug 18, 2026
41ea4aa
S5 task 3: C12 core-count guards — clamp hardware_concurrency() to >=…
fengwang Aug 18, 2026
5dca4f6
S5 task 4: save_png fopen guard (silent no-op on open failure; noexce…
fengwang Aug 18, 2026
d5e7b56
S5 closeout: sharded review (4 shards x 6 axes: 0 Critical/High, 5 Lo…
fengwang Aug 18, 2026
6269f15
session 6: refining phases + pre-flight evidence (F1-F3 classified)
fengwang Aug 18, 2026
1ecb0d1
session 6 T1: fft suite case (RED pre-fix: 412/450 assertions fail; e…
fengwang Aug 18, 2026
c50bde4
session 6 T2: P1 fast separable radix-2 fft/ifft (whole-matrix PoT se…
fengwang Aug 18, 2026
092eb1a
session 6 T3: C13 fftshift/ifftshift circular roll by (n+1)/2 per axi…
fengwang Aug 18, 2026
b719617
session 6 T4: A2 alias retirement — random/random_like/pinverse/svd_i…
fengwang Aug 18, 2026
1a5215d
session 6 T5+T6: evidence map closeout (§5: P1/C13/A2/A3/R1 fixed-or-…
fengwang Aug 18, 2026
466835d
session 6 T7: ReadMe sweep — S2 load_npy validation delta (verbatim),…
fengwang Aug 18, 2026
692fe3b
session 6 T8: project closeout — S6 risk-register watch items (E19 op…
fengwang Aug 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,12 @@ images/mandelbrot_4/*
images/mandelbrot_5/*
images/julia_set/*
tmp/*
.omo/
adversarial_verifier.md
docs/prompts/
docs/templates/
AGENTS.md
CLAUDE.md
ENVIRONMENTS.md
REVIEW.md
.work/
2 changes: 2 additions & 0 deletions .work/evidence/baseline_make_test.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
g++ -c -std=c++20 -Wall -Wextra -fmax-errors=1 -Ofast -flto=auto -funroll-all-loops -pipe -march=native -DPARALLEL -o ./test.o tests/test.cc
g++ -o ./test_test ./test.o -Ofast -pthread -lstdc++fs -Wl,--gc-sections -flto
3 changes: 3 additions & 0 deletions .work/evidence/baseline_suite_run.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
===============================================================================
All tests passed (49216592 assertions in 57 test cases)

10 changes: 10 additions & 0 deletions .work/evidence/bug_restore_c1_build.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
g++ -c -std=c++20 -Wall -Wextra -fmax-errors=1 -Ofast -flto=auto -funroll-all-loops -pipe -march=native -DPARALLEL -o ./test.o tests/test.cc
In file included from tests/test.cc:1:
tests/../matrix.hpp: In instantiation of ‘feng::crtp_shrink_to_size<Matrix, Type, Alloc>::zen_type& feng::crtp_shrink_to_size<Matrix, Type, Alloc>::shrink_to_size(size_type, size_type) [with Matrix = feng::matrix<double>; Type = double; Alloc = std::allocator<double>; zen_type = feng::matrix<double>; size_type = long unsigned int]’:
tests/./cases/shrink_to_size.hpp:11:25: required from here
11 | m.shrink_to_size( 5, 3 );
| ~~~~~~~~~~~~~~~~^~~~~~~~
tests/../matrix.hpp:3529:29: warning: unused variable ‘the_cols_to_copy’ [-Wunused-variable]
3529 | size_type const the_cols_to_copy = std::min( zen.col(), new_col );
| ^~~~~~~~~~~~~~~~
g++ -o ./test_test ./test.o -Ofast -pthread -lstdc++fs -Wl,--gc-sections -flto
21 changes: 21 additions & 0 deletions .work/evidence/bug_restore_c1_run.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test_test is a Catch v2.0.1 host application.
Run with -? for options

-------------------------------------------------------------------------------
Matrix shrink_to_size
-------------------------------------------------------------------------------
tests/./cases/shrink_to_size.hpp:3
...............................................................................

tests/./cases/shrink_to_size.hpp:30: FAILED:
REQUIRE( std::abs( m[r][c] - expected[r][c] ) < 1.0e-12 )
with expansion:
23.0 < 0.0

===============================================================================
test cases: 1 | 0 passed | 1 failed
assertions: 26 | 25 passed | 1 failed

timeout: the monitored command dumped core
2 changes: 2 additions & 0 deletions .work/evidence/bug_restore_c2_build.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
g++ -c -std=c++20 -Wall -Wextra -fmax-errors=1 -Ofast -flto=auto -funroll-all-loops -pipe -march=native -DPARALLEL -o ./test.o tests/test.cc
g++ -o ./test_test ./test.o -Ofast -pthread -lstdc++fs -Wl,--gc-sections -flto
27 changes: 27 additions & 0 deletions .work/evidence/bug_restore_c2_run.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test_test is a Catch v2.0.1 host application.
Run with -? for options

-------------------------------------------------------------------------------
Matrix flipdim
-------------------------------------------------------------------------------
tests/./cases/flip.hpp:3
...............................................................................

tests/./cases/flip.hpp:20: FAILED:
REQUIRE( std::abs( f[r][c] - expected[r][c] ) < 1.0e-12 )
with expansion:
4.0 < 0.0

double free or corruption (out)
tests/./cases/flip.hpp:3: FAILED:
{Unknown expression after the reported line}
due to a fatal error condition:
SIGABRT - Abort (abnormal termination) signal

===============================================================================
test cases: 1 | 1 failed
assertions: 5 | 3 passed | 2 failed

timeout: the monitored command dumped core
20 changes: 20 additions & 0 deletions .work/evidence/bug_restore_red.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test_test is a Catch v2.0.1 host application.
Run with -? for options

-------------------------------------------------------------------------------
load_npy rejects an overflowing header_length (0xFFFFFFFF)
-------------------------------------------------------------------------------
tests/./cases/load_npy.hpp:160
...............................................................................

tests/./cases/load_npy.hpp:160: FAILED:
{Unknown expression after the reported line}
due to a fatal error condition:
SIGSEGV - Segmentation violation signal

===============================================================================
test cases: 1 | 1 failed
assertions: 2 | 1 passed | 1 failed

12 changes: 12 additions & 0 deletions .work/evidence/diff_audit.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.work/evidence/final_suite_run.log
docs/session_2/brainstorming.md
docs/session_2/design.md
docs/session_2/execution_contract.md
docs/session_2/plan.md
docs/session_2/proposal.md
docs/session_2/specs/load_npy_happy_path.md
docs/session_2/specs/load_npy_rejection_semantics.md
docs/session_2/specs/load_npy_validation.md
docs/session_2/tasks.md
matrix.hpp
tests/cases/load_npy.hpp
2 changes: 2 additions & 0 deletions .work/evidence/final_make_test.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
g++ -c -std=c++20 -Wall -Wextra -fmax-errors=1 -Ofast -flto=auto -funroll-all-loops -pipe -march=native -DPARALLEL -o ./test.o tests/test.cc
g++ -o ./test_test ./test.o -Ofast -pthread -lstdc++fs -Wl,--gc-sections -flto
8 changes: 8 additions & 0 deletions .work/evidence/final_probe_full.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
PASS e01a
PASS e01b
PASS e01c
PASS e02a
PASS e02b
PASS e02c
PASS E01
PASS E02
3 changes: 3 additions & 0 deletions .work/evidence/final_suite_run.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
===============================================================================
All tests passed (49216811 assertions in 64 test cases)

8 changes: 8 additions & 0 deletions .work/evidence/independent_probe.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
PASS i1
PASS i2
PASS i3
PASS i4
PASS i5
PASS i6
PASS independent-E01
PASS independent-E02
Empty file.
47 changes: 47 additions & 0 deletions .work/evidence/prefix_e01a.err
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
=================================================================
==302339==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7c3fe21e00b8 at pc 0x7f7fe3928ed9 bp 0x7ffe61b77c70 sp 0x7ffe61b77428
WRITE of size 40 at 0x7c3fe21e00b8 thread T0
#0 0x7f7fe3928ed8 in memmove (/usr/lib/libasan.so.8+0x128ed8) (BuildId: b8a4241051a1621937fdc46e867ba7ecb56d96ea)
#1 0x55e7c51fbcd0 in main (/workspace/github.repo/matrix/.work/probe_s1+0x8cd0) (BuildId: 2dda3fdb7bc28c0cc9802f1c69c03c918eca7751)
#2 0x7f7fe3027780 (/usr/lib/libc.so.6+0x27780) (BuildId: 503200d7fda94a5dc6058d7e0694e5d1dcb2e372)
#3 0x7f7fe30278b8 in __libc_start_main (/usr/lib/libc.so.6+0x278b8) (BuildId: 503200d7fda94a5dc6058d7e0694e5d1dcb2e372)
#4 0x55e7c51f7364 in _start (/workspace/github.repo/matrix/.work/probe_s1+0x4364) (BuildId: 2dda3fdb7bc28c0cc9802f1c69c03c918eca7751)

0x7c3fe21e00b8 is located 0 bytes after 120-byte region [0x7c3fe21e0040,0x7c3fe21e00b8)
allocated by thread T0 here:
#0 0x7f7fe392d2a1 in operator new(unsigned long) (/usr/lib/libasan.so.8+0x12d2a1) (BuildId: b8a4241051a1621937fdc46e867ba7ecb56d96ea)
#1 0x55e7c51fbaf6 in main (/workspace/github.repo/matrix/.work/probe_s1+0x8af6) (BuildId: 2dda3fdb7bc28c0cc9802f1c69c03c918eca7751)

SUMMARY: AddressSanitizer: heap-buffer-overflow (/workspace/github.repo/matrix/.work/probe_s1+0x8cd0) (BuildId: 2dda3fdb7bc28c0cc9802f1c69c03c918eca7751) in main
Shadow bytes around the buggy address:
0x7c3fe21dfe00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x7c3fe21dfe80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x7c3fe21dff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x7c3fe21dff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x7c3fe21e0000: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
=>0x7c3fe21e0080: 00 00 00 00 00 00 00[fa]fa fa fa fa fa fa fa fa
0x7c3fe21e0100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x7c3fe21e0180: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x7c3fe21e0200: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x7c3fe21e0280: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x7c3fe21e0300: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==302339==ABORTING
Empty file added .work/evidence/prefix_e01a.out
Empty file.
Empty file added .work/evidence/prefix_e01b.err
Empty file.
2 changes: 2 additions & 0 deletions .work/evidence/prefix_e01b.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FAIL e01b: 3x10->5x2: expected [[1,2],[11,12],[21,22],[0,0],[0,0]]
got row0: 1 2 | row2: 21 22 | row4: 0 0
47 changes: 47 additions & 0 deletions .work/evidence/prefix_e02a.err
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
=================================================================
==302349==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7ca9b0fe01a0 at pc 0x55e5e4dac10a bp 0x7fffc3b9abb0 sp 0x7fffc3b9aba0
READ of size 8 at 0x7ca9b0fe01a0 thread T0
#0 0x55e5e4dac109 in feng::matrix<double, std::allocator<double> > const feng::flipdim<double, std::allocator<double> >(feng::matrix<double, std::allocator<double> > const&, unsigned long) (/workspace/github.repo/matrix/.work/probe_s1+0x32109) (BuildId: 2dda3fdb7bc28c0cc9802f1c69c03c918eca7751)
#1 0x55e5e4d84dda in main (/workspace/github.repo/matrix/.work/probe_s1+0xadda) (BuildId: 2dda3fdb7bc28c0cc9802f1c69c03c918eca7751)
#2 0x7fe9b1e27780 (/usr/lib/libc.so.6+0x27780) (BuildId: 503200d7fda94a5dc6058d7e0694e5d1dcb2e372)
#3 0x7fe9b1e278b8 in __libc_start_main (/usr/lib/libc.so.6+0x278b8) (BuildId: 503200d7fda94a5dc6058d7e0694e5d1dcb2e372)
#4 0x55e5e4d7e364 in _start (/workspace/github.repo/matrix/.work/probe_s1+0x4364) (BuildId: 2dda3fdb7bc28c0cc9802f1c69c03c918eca7751)

0x7ca9b0fe01a0 is located 40 bytes after 120-byte region [0x7ca9b0fe0100,0x7ca9b0fe0178)
allocated by thread T0 here:
#0 0x7fe9b272d2a1 in operator new(unsigned long) (/usr/lib/libasan.so.8+0x12d2a1) (BuildId: b8a4241051a1621937fdc46e867ba7ecb56d96ea)
#1 0x55e5e4dabc53 in feng::matrix<double, std::allocator<double> > const feng::flipdim<double, std::allocator<double> >(feng::matrix<double, std::allocator<double> > const&, unsigned long) (/workspace/github.repo/matrix/.work/probe_s1+0x31c53) (BuildId: 2dda3fdb7bc28c0cc9802f1c69c03c918eca7751)

SUMMARY: AddressSanitizer: heap-buffer-overflow (/workspace/github.repo/matrix/.work/probe_s1+0x32109) (BuildId: 2dda3fdb7bc28c0cc9802f1c69c03c918eca7751) in feng::matrix<double, std::allocator<double> > const feng::flipdim<double, std::allocator<double> >(feng::matrix<double, std::allocator<double> > const&, unsigned long)
Shadow bytes around the buggy address:
0x7ca9b0fdff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x7ca9b0fdff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x7ca9b0fe0000: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
0x7ca9b0fe0080: 00 00 00 00 00 00 00 fa fa fa fa fa fa fa fa fa
0x7ca9b0fe0100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fa
=>0x7ca9b0fe0180: fa fa fa fa[fa]fa fa fa fa fa fa fa fa fa fa fa
0x7ca9b0fe0200: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x7ca9b0fe0280: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x7ca9b0fe0300: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x7ca9b0fe0380: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x7ca9b0fe0400: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==302349==ABORTING
Empty file added .work/evidence/prefix_e02a.out
Empty file.
Empty file added .work/evidence/prefix_e02b.err
Empty file.
1 change: 1 addition & 0 deletions .work/evidence/prefix_e02b.out
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FAIL e02b: 4x4 flipdim(.,2): expected f[r][c] == m[r][3-c]
Empty file added .work/evidence/prefix_e02c.err
Empty file.
1 change: 1 addition & 0 deletions .work/evidence/prefix_e02c.out
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PASS e02c
49 changes: 49 additions & 0 deletions .work/evidence/prefix_e03_11b.err
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
=================================================================
==3665897==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7b6367be0f40 at pc 0x7f4369329a22 bp 0x7ffcf96f7ca0 sp 0x7ffcf96f7448
READ of size 65535 at 0x7b6367be0f40 thread T0
#0 0x7f4369329a21 in memcpy (/usr/lib/libasan.so.8+0x129a21) (BuildId: b8a4241051a1621937fdc46e867ba7ecb56d96ea)
#1 0x55a50957ca10 in feng::crtp_load_npy<feng::matrix<double, std::allocator<double> >, double, std::allocator<double> >::load_npy(char const*) (/workspace/github.repo/matrix/.work/probe_s2+0x47a10) (BuildId: d65328cd33b9239d930f98236f0cb64ccd4afe04)
#2 0x55a509546527 in run_load_case(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<unsigned char, std::allocator<unsigned char> > const&, feng::matrix<double, std::allocator<double> >&) (/workspace/github.repo/matrix/.work/probe_s2+0x11527) (BuildId: d65328cd33b9239d930f98236f0cb64ccd4afe04)
#3 0x55a50954922f in main (/workspace/github.repo/matrix/.work/probe_s2+0x1422f) (BuildId: d65328cd33b9239d930f98236f0cb64ccd4afe04)
#4 0x7f4368a27780 (/usr/lib/libc.so.6+0x27780) (BuildId: 503200d7fda94a5dc6058d7e0694e5d1dcb2e372)
#5 0x7f4368a278b8 in __libc_start_main (/usr/lib/libc.so.6+0x278b8) (BuildId: 503200d7fda94a5dc6058d7e0694e5d1dcb2e372)
#6 0x55a50953b524 in _start (/workspace/github.repo/matrix/.work/probe_s2+0x6524) (BuildId: d65328cd33b9239d930f98236f0cb64ccd4afe04)

0x7b6367be0f40 is located 0 bytes after 16-byte region [0x7b6367be0f30,0x7b6367be0f40)
allocated by thread T0 here:
#0 0x7f436932d2a1 in operator new(unsigned long) (/usr/lib/libasan.so.8+0x12d2a1) (BuildId: b8a4241051a1621937fdc46e867ba7ecb56d96ea)
#1 0x55a50957b665 in void std::vector<char, std::allocator<char> >::_M_range_initialize<std::istreambuf_iterator<char, std::char_traits<char> > >(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char, std::char_traits<char> >, std::input_iterator_tag) (/workspace/github.repo/matrix/.work/probe_s2+0x46665) (BuildId: d65328cd33b9239d930f98236f0cb64ccd4afe04)

SUMMARY: AddressSanitizer: heap-buffer-overflow (/workspace/github.repo/matrix/.work/probe_s2+0x47a10) (BuildId: d65328cd33b9239d930f98236f0cb64ccd4afe04) in feng::crtp_load_npy<feng::matrix<double, std::allocator<double> >, double, std::allocator<double> >::load_npy(char const*)
Shadow bytes around the buggy address:
0x7b6367be0c80: fa fa 06 fa fa fa 00 04 fa fa 00 04 fa fa 00 04
0x7b6367be0d00: fa fa 00 04 fa fa 00 04 fa fa 00 07 fa fa 00 04
0x7b6367be0d80: fa fa 00 04 fa fa 00 04 fa fa 00 04 fa fa 00 04
0x7b6367be0e00: fa fa 00 00 fa fa 06 fa fa fa 00 00 fa fa 06 fa
0x7b6367be0e80: fa fa 00 05 fa fa fd fa fa fa fd fa fa fa fd fa
=>0x7b6367be0f00: fa fa fd fa fa fa 00 00[fa]fa fa fa fa fa fa fa
0x7b6367be0f80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x7b6367be1000: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x7b6367be1080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x7b6367be1100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x7b6367be1180: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==3665897==ABORTING
Empty file.
2 changes: 2 additions & 0 deletions .work/evidence/prefix_e03_12b.err
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::substr: __pos (which is 9) > this->size() (which is 2)
Empty file.
2 changes: 2 additions & 0 deletions .work/evidence/prefix_e03_16digit.err
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
terminate called after throwing an instance of 'std::out_of_range'
what(): stoul
Empty file.
2 changes: 2 additions & 0 deletions .work/evidence/prefix_e03_1d.err
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
terminate called after throwing an instance of 'std::invalid_argument'
what(): stoul
Empty file.
48 changes: 48 additions & 0 deletions .work/evidence/prefix_e03_3b.err
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
=================================================================
==3665895==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7bcd127e0ef6 at pc 0x55e56ba3f880 bp 0x7ffc696575f0 sp 0x7ffc696575e0
READ of size 1 at 0x7bcd127e0ef6 thread T0
#0 0x55e56ba3f87f in feng::crtp_load_npy<feng::matrix<double, std::allocator<double> >, double, std::allocator<double> >::load_npy(char const*) (/workspace/github.repo/matrix/.work/probe_s2+0x4787f) (BuildId: d65328cd33b9239d930f98236f0cb64ccd4afe04)
#1 0x55e56ba09527 in run_load_case(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<unsigned char, std::allocator<unsigned char> > const&, feng::matrix<double, std::allocator<double> >&) (/workspace/github.repo/matrix/.work/probe_s2+0x11527) (BuildId: d65328cd33b9239d930f98236f0cb64ccd4afe04)
#2 0x55e56ba0bda8 in main (/workspace/github.repo/matrix/.work/probe_s2+0x13da8) (BuildId: d65328cd33b9239d930f98236f0cb64ccd4afe04)
#3 0x7fad13627780 (/usr/lib/libc.so.6+0x27780) (BuildId: 503200d7fda94a5dc6058d7e0694e5d1dcb2e372)
#4 0x7fad136278b8 in __libc_start_main (/usr/lib/libc.so.6+0x278b8) (BuildId: 503200d7fda94a5dc6058d7e0694e5d1dcb2e372)
#5 0x55e56b9fe524 in _start (/workspace/github.repo/matrix/.work/probe_s2+0x6524) (BuildId: d65328cd33b9239d930f98236f0cb64ccd4afe04)

0x7bcd127e0ef6 is located 2 bytes after 4-byte region [0x7bcd127e0ef0,0x7bcd127e0ef4)
allocated by thread T0 here:
#0 0x7fad13f2d2a1 in operator new(unsigned long) (/usr/lib/libasan.so.8+0x12d2a1) (BuildId: b8a4241051a1621937fdc46e867ba7ecb56d96ea)
#1 0x55e56ba3e665 in void std::vector<char, std::allocator<char> >::_M_range_initialize<std::istreambuf_iterator<char, std::char_traits<char> > >(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char, std::char_traits<char> >, std::input_iterator_tag) (/workspace/github.repo/matrix/.work/probe_s2+0x46665) (BuildId: d65328cd33b9239d930f98236f0cb64ccd4afe04)

SUMMARY: AddressSanitizer: heap-buffer-overflow (/workspace/github.repo/matrix/.work/probe_s2+0x4787f) (BuildId: d65328cd33b9239d930f98236f0cb64ccd4afe04) in feng::crtp_load_npy<feng::matrix<double, std::allocator<double> >, double, std::allocator<double> >::load_npy(char const*)
Shadow bytes around the buggy address:
0x7bcd127e0c00: fa fa 06 fa fa fa 00 00 fa fa 06 fa fa fa 00 00
0x7bcd127e0c80: fa fa 06 fa fa fa 00 04 fa fa 00 04 fa fa 00 04
0x7bcd127e0d00: fa fa 00 04 fa fa 00 04 fa fa 00 07 fa fa 00 04
0x7bcd127e0d80: fa fa 00 04 fa fa 00 04 fa fa 00 04 fa fa 00 04
0x7bcd127e0e00: fa fa 00 00 fa fa 06 fa fa fa 00 00 fa fa 06 fa
=>0x7bcd127e0e80: fa fa 03 fa fa fa fd fa fa fa fd fa fa fa[04]fa
0x7bcd127e0f00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x7bcd127e0f80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x7bcd127e1000: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x7bcd127e1080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x7bcd127e1100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==3665895==ABORTING
Empty file.
Empty file.
2 changes: 2 additions & 0 deletions .work/evidence/prefix_e03_be.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FAIL e03_be: big-endian '>f8' into matrix<double> -> ok=1
FAIL: 1 case(s) not as expected
Empty file.
3 changes: 3 additions & 0 deletions .work/evidence/prefix_e03_exact.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ok e03_exact: payload ends exactly at file tail -> ok=1 content=1
PASS E03
PASS E04
Loading
Loading