Files
ngspice/src
alto555andClaude Opus 4.8 b2ec82609e `show' printed a device's vector parameter (a source's pulse/pwl/ac
coefficient list) one element at a time, calling askInstanceQuest for
every element.  Two bugs made that catastrophic on a large chip:

  * IFvalue val was uninitialised, so a query that did not set
    v.numValue left `n' as stack garbage -- the element loop then ran
    essentially forever.
  * askInstanceQuest TMALLOCs the coefficient vector (vsrcask.c) on
    every call and printvals()/printvals_old() never freed it, so the
    listing leaked O(n^2) allocations -- tens of GB on a deck with many
    stimulus sources.

Fix: memset val before the query and clamp n (kills the runaway loop),
and free the returned vector after use via a new free_if_vec() helper.
Verified: pulse coefficients still print correctly; show on MOS/BSIM4/
OSDI/vsource is unchanged and does not crash.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-07-17 11:44:41 +02:00
..
2026-04-28 11:49:13 +02:00
2026-07-08 22:46:54 +02:00
2023-03-18 14:37:02 +01:00
2026-04-30 13:06:29 +02:00