clapack: fix stack buffer overflow in ilaenv_ and prevent Intel runtime symbol interposition

Summary

Two bugs in the bundled CLAPACK were fixed:

  1. Buffer overflow in ilaenv_ (ilaenv.c): the f2c-translated local variable subnam was declared as char subnam[1] instead of the correct char subnam[6] (mistranslation of Fortran CHARACTER*6 SUBNAM). The subsequent uppercase-conversion loop and s_copy call wrote out of bounds.
  2. Symbol interposition by Intel's Fortran runtime (libifcore/MKL): s_cmp, s_copy, and related f2c helpers share names with Intel's runtime, which exports them with 32-bit int length arguments (vs. f2c's 64-bit ftnlen). When Intel libraries appear in the same link the dynamic linker resolves these to Intel's ABI-incompatible versions, causing stack corruption. The existing blaswrap.h rename mechanism (already used for all BLAS symbols) is extended with 12 new #define renames covering the affected f2c helpers and LAPACK utility routines. The #include "blaswrap.h" is added to f2c.h so that the renames apply uniformly to all CLAPACK translation units, including F2CLIBS.

Documentation

Checklist

  • All code changes are covered by unit tests
  • Code coverage did not deteriorate
  • Code follows Style Guide
  • Documentation updated, if necessary
  • WIP: Manual running of configure/build jobs was successful
  • Update changelog, if changes are worth mentioning (Develop section in doc/src/changelog.dox, add section if not yet included)

Merge request reports

Loading