-1

So, i am registering the broadcastRadio HAL by creating an object in the Stack memory. In this case the crash is observed in RegisterAsService as:

: signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------

: 01-01 00:00:21.659 631 631 F DEBUG : Abort message: 'sp<> constructed with stack pointer argument'

The registerworks successfully when the HAL object is created in HEAP through a Android::SP. Any clue what would be case here.

  • https://android.googlesource.com/platform/system/core/+/master/libutils/StrongPointer.cpp – Martin Zeitler May 24 '22 at 05:28
  • This gives the function definition, but the reason for register to fail is not quite clear. – Viren mahajan May 24 '22 at 05:29
  • Why don't you read the error message? It clearly tells that you cannot pass stack pointer. And since the question barely consists of an error message, without the code which produces it, this is not reproducible and should be closed. – Martin Zeitler May 24 '22 at 05:30
  • I do get the error statement. But is there any logical explanation for this. It would really be appreciated – Viren mahajan May 24 '22 at 05:33
  • As stated, read the error message, it provides the logical explanation, which you seem to ignore. See: https://stackoverflow.com/questions/1464035/what-is-a-stack-pointer-used-for-in-microprocessors – Martin Zeitler May 24 '22 at 05:56

0 Answers0