[LTP] coredump01: New core_pattern specifiers test

Andrea Cervesato andrea.cervesato@suse.com
Fri Sep 4 14:26:51 CEST 2026


> 
> This manually dispatches separate functions for the two test cases. Use a
> single struct tcase array and a generic .test callback, with
> .tcnt = ARRAY_SIZE(tcases), as required for multi-case tests.

no need for this.

> 
> --- [PATCH 2/2] ---
> 
> > 		} else if (ph[i].p_type == PT_LOAD) {
> > 			have_load = 1;
> > 		}
> 
> This only proves that a PT_LOAD header exists, not that its data is present.
> A short dump_emit() after the headers and notes leaves WCOREDUMP set, so a
> truncated core can pass every check here. Validate p_offset + p_filesz against
> core_len with overflow-safe arithmetic for every file-backed segment.
> 

this is valid

--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com


More information about the ltp mailing list