WorstCaseStack icon indicating copy to clipboard operation
WorstCaseStack copied to clipboard

Error data is missing in fxn dictionary

Open saloid opened this issue 4 years ago • 2 comments

Getting this errors.

Error data is missing in fxn dictionary {'tu': '.\\flexcan_irq.c', 'name': 'CAN0_ORed_IRQHandler.localalias.0', 'binding': 'LOCAL'}
Error data is missing in fxn dictionary {'tu': '.\\flexcan_irq.c', 'name': 'CAN1_ORed_IRQHandler.localalias.1', 'binding': 'LOCAL'}
Error data is missing in fxn dictionary {'tu': '.\\flexcan_irq.c', 'name': 'CAN2_ORed_IRQHandler.localalias.2', 'binding': 'LOCAL'}
Traceback (most recent call last):
  File "../../toolchain/WCS/WCS.py", line 431, in <module>
    main()
  File "../../toolchain/WCS/WCS.py", line 422, in main
    resolve_all_calls(call_graph)
  File "../../toolchain/WCS/WCS.py", line 243, in resolve_all_calls
    resolve_calls(fxn_dict)
  File "../../toolchain/WCS/WCS.py", line 229, in resolve_calls
    for call in fxn_dict2['calls']:
KeyError: 'calls'

Not sure what it mean, but here how this functions looks in code:

void CAN2_ORed_IRQHandler(void)
{
    FLEXCAN_IRQHandler(2U);
}

This code is from NXP SDK for S32K144 MCU.

saloid avatar Jan 26 '21 14:01 saloid

It's interrupt handlers, so they are never called from code, Maybe it's an issue. Anyway, is it possible to ignore such functions?

saloid avatar Jan 26 '21 14:01 saloid

This is a tricky one to come up with a good fix but I suggest to set data['calls'] = set() as a quick fix to get some result at all. for a better fix: functions without caller may get called by a function pointer or other methods so for a worst case scenario they should be considdered called on top of the worst call.

DEvil0000 avatar Aug 29 '22 17:08 DEvil0000