Changes between Initial Version and Version 1 of Ticket #63384, comment 4


Ignore:
Timestamp:
Aug 18, 2021, 4:01:12 AM (3 years ago)
Author:
ryandesign (Ryan Carsten Schmidt)
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #63384, comment 4

    initial v1  
    99}}}
    1010
    11 It needs to know where its data is. At build time, it has not been installed yet, so the path to the data is within the build directory; it sets the ESPEAK_DATA_PATH environment variable to this value. The length of that path is pretty long in a standard MacPorts install: "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_espeak-ng/espeak-ng/work/espeak-ng-1.50/" per this user's log is 159 characters, but if a user uses a different MacPorts mirror it would be even longer. esound-ng uses a fixed-size character array to store the path that it gets from this environment variable, concatenated with the further 15 characters "/espeak-ng-data". The fixed size of the character array is 160 bytes (the #define is N_PATH_HOME), so in a standard MacPorts install, the path length exceeds the size of the array. The program is smart enough to detect that a memory overflow would occur and does not attempt to put the value into the variable, but it is evidently not smart enough to abort with an error explaining what the problem is.
     11It needs to know where its data is. At build time, it has not been installed yet, so the path to the data is within the build directory; it sets the ESPEAK_DATA_PATH environment variable to this value. The length of that path is pretty long in a standard MacPorts install: "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_espeak-ng/espeak-ng/work/espeak-ng-1.50/" per this user's log is 159 characters, but if a user uses a different MacPorts mirror it would be even longer. espeak-ng uses a fixed-size character array to store the path that it gets from this environment variable, concatenated with the further 15 characters "/espeak-ng-data". The fixed size of the character array is 160 bytes (the #define is N_PATH_HOME), so in a standard MacPorts install, the path length exceeds the size of the array. The program is smart enough to detect that a memory overflow would occur and does not attempt to put the value into the variable, but it is evidently not smart enough to abort with an error explaining what the problem is.
    1212
    1313So in fact there is nothing unusual about the user's system that makes this fail; rather, there is something unusual about my system and the buildbot systems that makes it succeed there, namely that they use shorter build paths because they use ports trees in non-standard locations. On my system, the path to the source directory is only 129 characters and on the buildbot it is only 122 characters.