summaryrefslogtreecommitdiffhomepage
path: root/fuzz
Commit message (Collapse)AuthorAgeFilesLines
* C23: nullptr for null pointers, constexpr for typed constantsSean Kurtz6 days1-1/+1
| | | | | | | | | | | | | | nullptr in every place a null pointer constant was meant; NULL is gone from src/. constexpr where it improves on #define without costing anything: the IGGCSI00 work-area offsets and sizes, and the scalar sizes MVS_DSN_MAX, CSI_FIELD_LEN, CSI_WORK_MIN, PDS_DIRBLK, CSI_WORK, CSI_MAX_CALLS. A constexpr in C is a constant expression, so it still bounds the arrays that use it, and it now carries a type and can be checked with static_assert. Feature switches (#if), the CSIETYPE/EBCDIC byte constants read as octets, and the related-constant enum sets stay as they were.
* Fuzz the CSI search cursor and the name and byte-map helpersSean Kurtz12 days1-3/+66
| | | | | | | | | | | | The first byte now selects among six paths. Two new ones: csi_search() driven by a fake IGGCSI00 that hands back the fuzz bytes and may ask for a resume, at both the minimum work area length and three bytes more; and mvs_name(), mvs_from_ebcdic() and mvs_to_ebcdic() over exactly-sized heap buffers, so an off-by-one in trimming or in the 44-byte name fields is caught by ASan. 90 seconds, about 60 million executions, no ASan or UBSan report. src/builtin.c's hunk is clang-format reflowing the previous change.
* z/OS: file tagging, catalog completion, time, and per-command optionsSean Kurtz2026-11-151-0/+64
Tagging and conversion (sys_zos.c, redir.c, input.c, var.c, exec.c): - _TAG_REDIR_IN/OUT/ERR as /bin/sh documents them, cached by variable hooks so redirection tests a byte; honoured as a prefix on external commands and on pipeline stages. - ASCII builds tag new output and here-document files as text, tag pipes IBM-1047 (set +o pipetag to stop), and switch on autoconvert. - Scripts, . files, profile and ENV are read in either character set: tagged files get F_CONTROL_CVT, untagged ones are sniffed. - tag/chtag primitives (sys_tag_get/sys_tag_set) for a builtin to come. Data set completion (complete.c, mvsfmt.[ch], zos_csi.s): - //'HLQ.PART, "//'HLQ.PART, //NAME (user HLQ), //'DSN(MEM, //DD:NAME complete one qualifier at a time from the Catalog Search Interface, PDS directories and the TIOT. - IGGCSI00 is called through HLASM glue that switches to AMODE 31 and keeps every register and parameter below the bar (VERIFY). - The work-area, directory and TIOT decoders are portable and run on Linux against a stand-in catalog that produces the real EBCDIC bytes, including CSI resume and directory-block splits; fuzzed with libFuzzer (make fuzz). - A lone completion inside quotes now closes the quote. Other z/OS features: - time [-p] keyword with shell/children CPU split. - set -o jobnames (_BPX_JOBNAME per command), set -o shareas (_BPX_SHAREAS=YES for foreground commands only), set -o msgid (ZSHnnnnE/W message IDs), ulimit -M (MEMLIMIT), ZOS_SYSNAME, ZOS_SYSPLEX, ZOS_RELEASE, ZOS_ASID, ZOS_JOBNAME, prompt \S. - BPXWDYN entry point for an alloc builtin to come. Checking z/OS code off z/OS: - make zos-lint compiles sys_zos.c against declarations transcribed from the z/OS headers, and the rest with the MVS paths forced on. - make mvs-asan runs the suite with the MVS paths on, under ASan/UBSan. - make asan and make valgrind now check for leaks.