|
5 | 5 | # ------------------------------------------------------------------------------ |
6 | 6 | # The MIT License (MIT) |
7 | 7 | # |
8 | | -# Copyright (c) 2021-2025 Aarno Labs, LLC |
| 8 | +# Copyright (c) 2021-2026 Aarno Labs, LLC |
9 | 9 | # |
10 | 10 | # Permission is hereby granted, free of charge, to any person obtaining a copy |
11 | 11 | # of this software and associated documentation files (the "Software"), to deal |
@@ -1316,15 +1316,30 @@ def include_target(target: 'CallTarget') -> bool: |
1316 | 1316 | buffersize = stackframe.stackoffset_gap(dstoffset) |
1317 | 1317 | if buffersize is None: |
1318 | 1318 | chklogger.logger.warning( |
1319 | | - "Stackbuffer for %s at offset %s does not have a size and no upperbound either", |
| 1319 | + "Stackbuffer for %s at offset %s does not have a size and " |
| 1320 | + + "no upperbound either", |
1320 | 1321 | str(instr), str(dstoffset)) |
1321 | 1322 | continue |
1322 | 1323 | else: |
1323 | 1324 | chklogger.logger.warning( |
1324 | | - "Stackbuffer for %s at offset %s does not have a size, but stackframe " |
1325 | | - + " allows a buffer of %s", |
| 1325 | + "Stackbuffer for %s at offset %s does not have a size, " |
| 1326 | + + "but stackframe allows a buffer of %s", |
1326 | 1327 | str(instr), str(dstoffset), str(buffersize)) |
1327 | 1328 | sizeorigin = "stackframe-layout" |
| 1329 | + elif buffersize == 1: |
| 1330 | + buffersize = stackframe.stackoffset_gap(dstoffset) |
| 1331 | + if buffersize is None: |
| 1332 | + chklogger.logger.warning( |
| 1333 | + "Stackbuffer size for %s at offset %s is reported to be 1 " |
| 1334 | + + " and no buffer size could be derived from the stacklayout", |
| 1335 | + str(instr), str(dstoffset)) |
| 1336 | + continue |
| 1337 | + else: |
| 1338 | + chklogger.logger.warning( |
| 1339 | + "Stackbuffer size for %s at offset %s is reported to be 1 " |
| 1340 | + + "; replacing it by the size derived from the stacklayout", |
| 1341 | + str(instr), str(dstoffset)) |
| 1342 | + sizeorigin = "stackframe-layout" |
1328 | 1343 | else: |
1329 | 1344 | sizeorigin = "stackslot-access" |
1330 | 1345 |
|
|
0 commit comments