Commit Graph
5 Commits
Author SHA1 Message Date
dhaern 6876288761 Harden launcher config parsing and release packaging
Validate Env identifiers and accept UTF-8 BOMs and last-value INI keys.
Resolve the OptiScaler GPL license before builds and support both system
license locations. Match the bridge's KFD selection by SIMD count.
2026-10-06 00:39:47 +00:00
dhaern c7f645d153 Fix shim log path, numeric settings and RGB9E5 range
- Build the default log path from the DLL's folder, now recorded even
  without d4r.ini, instead of copying the name into a MAX_PATH buffer
  that a folder path of 246+ characters overflowed; no log is opened
  when that folder is unknown
- Fall back to the default when a numeric setting does not start with a
  decimal digit, so MarkerPollUs = -1 no longer polls every ~71 minutes;
  hex values such as 0x40 still parse
- Decode RGB9E5 exponent 0 as c * 2^-24 instead of zero, and encode with
  the format's real maximum 65408 (511 * 2^7) and exponents from 0
- Choose the RGB9E5 exponent by the rounded channel (< 511.5), so a
  value such as 511.25 keeps the lower exponent instead of decoding as 512
2026-10-06 00:39:46 +00:00
dhaern 51afff95de Reject truncated native code objects in ZLUDA
An interrupted extraction or a full disk can leave an empty or truncated
.hsaco, and hipModuleLoadData can crash on it. native_override now skips
files under 64 bytes and ELF files whose section header table ends past
the end of the file; ZLUDA then compiles the PTX as usual.
2026-10-06 00:03:49 +00:00
dhaern 369eff35a1 Harden native kernel serving and output redirects
- Fatbin parser: stop when an entry header runs past the declared files
  size instead of wrapping the unsigned remainder and reading outside the
  image.
- Output kernel table: keep the latest 64 lookups and resolve launches
  newest first under its own lock, so a full table no longer drops new
  lookups and a handle reused by a later output-kernel lookup resolves
  with that lookup.
- Resolve a relative D4R_ZLUDA_NATIVE_DIR before linking its kernels into
  the per-process directory; the relative links dangled.
- cuSurfObjectCreate: destroy the surface and return the error when its
  output redirect cannot be written.
- Serve native kernels from D4R_ZLUDA_CACHE_HOME, XDG_CACHE_HOME or
  ~/.cache, never /tmp, where the stale-PID cleanup could follow links
  planted by another user.
2026-10-06 00:03:49 +00:00
dhaern 4981cf0630 Clean up NGX state when feature setup fails
Reuse feature teardown on setup errors and publish output metadata only after all slots are ready. Keep render-size recovery retryable after failed restoration, and retry partially failed library loads.
2026-10-05 23:35:38 +00:00