Bug#956324: Clustalo bus error on mipsel (Was: Bug#956324: python-biopython: FTBFS on mipsel)
Matthew Fernandez <[email protected]>
| Newsgroups | gmane.linux.debian.devel.bugs.general,gmane.linux.debian.devel.mentors,gmane.linux.debian.ports.mips |
|---|---|
| Message-ID | <[email protected]> |
> On May 1, 2020, at 00:27, Jeffrey Walton <[email protected]> wrote: > > On Fri, May 1, 2020 at 3:05 AM Jeffrey Walton <[email protected] <mailto:[email protected]>> wrote: >> >> On Fri, May 1, 2020 at 2:14 AM Andreas Tille <[email protected]> wrote: >>> >>> ... >>> ==13209== Process terminating with default action of signal 10 (SIGBUS) >>> ==13209== at 0x12D5CC: PairDistances (pair_dist.c:346) >>> ==13209== by 0x119410: AlignmentOrder (clustal-omega.c:835) >>> ==13209== by 0x11A6C4: Align (clustal-omega.c:1221) >>> ==13209== by 0x1171C8: MyMain (mymain.c:1192) >>> ==13209== by 0x113CCC: main (main.cpp:469) >> >> Here is line 346 in >> https://salsa.debian.org/med-team/clustalo/-/blob/master/src/clustal/pair_dist.c#L346: >> >> NewProgress(&prProgress, LogGetFP(&rLog, LOG_INFO), >> "Ktuple-distance calculation progress", bPrintCR); >> >> For testing, change LogGetFP(&rLog, LOG_INFO) for stdout for testing. I.e., >> >> NewProgress(&prProgress, stdout,, >> "Ktuple-distance calculation progress", bPrintCR); >> >> It looks like LogGetFP retrieves an entry in an array of FILE*. From >> https://salsa.debian.org/med-team/clustalo/-/blob/master/src/clustal/log.h: >> >> typedef struct { >> /* the higher the level, the more priority it has. numbers must be >> * sequential >> */ >> >> /* array of function pointers */ >> void (*prFunc[LOG_NUM_LEVELS]) (FILE *prFP, char *pcFormat, >> va_list rVArgList); >> FILE *prFP[LOG_NUM_LEVELS]; >> char *prPrefix[LOG_NUM_LEVELS]; >> >> /* everything above this level will be printed */ >> int iLogLevelEnabled; >> } log_t; >> >> And https://salsa.debian.org/med-team/clustalo/-/blob/master/src/clustal/log.c: >> >> FILE * >> LogGetFP(log_t *prLog, int iLevel) >> { >> assert(iLevel>=0 && iLevel<=LOG_NUM_LEVELS); >> return prLog->prFP[iLevel]; >> } >> >> That should help determine if something is sideways in the log_t structure. > > Also, I think this should be: > >> FILE * >> LogGetFP(log_t *prLog, int iLevel) >> { >> assert(iLevel>=0 && iLevel<LOG_NUM_LEVELS); >> return prLog->prFP[iLevel]; >> } > > That is, 'iLevel<LOG_NUM_LEVELS' (not 'iLevel<=LOG_NUM_LEVELS’). Some further patches attached: 1. the log level correction Jeff noted. 2. remove a prototype for a non-existent function 3. delete a lot of dead code, aiming to minimise the number of lines we have to suspect in ongoing debugging. This is for debugging only; not intended to be applied during packaging.