kestreltechnology / ktadvance

KT Advance Memory Safety Analyzer for C
6 stars 3 forks source link

Analyze error #10

Closed beefstew closed 6 years ago

beefstew commented 6 years ago

Henny,

Hello! I hope that you've been well.

I'm running commit 7ddd61017881285913a79447253403f4595a9219 of the dev branch and receive errors on the analyze step.

To reproduce this error:

  1. cd /path/to/project
  2. rm -rf semantics
  3. python /path/to/ktadvance/advance/cmdline/mfapp/chc_parse_project.py --removesemantics --maketarget correctTarget . Ends with suitable looking output saying that it added Total 43 files (18362 lines)
  4. python /path/to/ktadvance/advance/cmdline/mfapp/chc_analyze_project.py --verbose .

A number of "Linking" messages appear. On the last one, it says:

--------------------------------------------------------------------------------
Linking Node/support/JSON/qdj
--------------------------------------------------------------------------------
Resolving 33 function prototypes
Unable to resolve prototype for Log: 11
Unable to resolve prototype for Log: 11
Unable to resolve prototype for __builtin_alloca: 0
Unable to resolve prototype for __builtin_va_end: 0
Unable to resolve prototype for __builtin_va_start: 0
Unable to resolve prototype for Log: 11
Unable to resolve prototype for Log: 11
Resolved prototype for ListZero
Resolved prototype for closeMqtt
Resolved prototype for MQTTProtocol_keepalive
Resolved prototype for MQTTProtocol_retry
Resolved prototype for Thread_start
Resolved prototype for Thread_lock_mutex
Resolved prototype for Thread_unlock_mutex
Resolved prototype for Thread_getid
Resolved prototype for Thread_create_sem
Resolved prototype for Log_initialize
Resolved prototype for Log_terminate
Unable to resolve prototype for Log: 11
Unable to resolve prototype for Log: 11
Resolved prototype for Thread_unlock_mutex
Resolved prototype for Thread_lock_mutex
Unable to resolve prototype for Log: 11
Resolved prototype for Thread_getid
Resolved prototype for Log_stackTrace
Unable to resolve prototype for Log: 11
Resolved prototype for Thread_getid
Resolved prototype for StackTrace_get
Unable to resolve prototype for Log: 11
Unable to resolve prototype for __builtin_va_start: 0
Resolved prototype for Messages_get
Unable to resolve prototype for __builtin_va_end: 0
Resolved prototype for log_data
Traceback (most recent call last):
  File "/media/psf/Home/Work/STAMP-STARLITE/repos/ktadvance/advance/cmdline/mfapp/chc_analyze_project.py", line 119, in <module>
    linker.save_global_compinfos()
  File "/media/psf/Home/Work/STAMP-STARLITE/repos/ktadvance/advance/linker/CLinker.py", line 180, in save_global_compinfos
    self.declarations.write_xml(xnode)
  File "/media/psf/Home/Work/STAMP-STARLITE/repos/ktadvance/advance/app/CGlobalDeclarations.py", line 428, in write_xml
    self.dictionary.write_xml(dnode)
  File "/media/psf/Home/Work/STAMP-STARLITE/repos/ktadvance/advance/app/CDictionary.py", line 489, in write_xml
    t.write_xml(tnode)
  File "/media/psf/Home/Work/STAMP-STARLITE/repos/ktadvance/advance/util/StringIndexedTable.py", line 129, in write_xml
    (ishex,sencoded) = encode(s)
  File "/media/psf/Home/Work/STAMP-STARLITE/repos/ktadvance/advance/util/StringIndexedTable.py", line 67, in encode
    if has_control_characters(s):
  File "/media/psf/Home/Work/STAMP-STARLITE/repos/ktadvance/advance/util/StringIndexedTable.py", line 31, in has_control_characters
    for c in s:
TypeError: 'NoneType' object is not iterable

This is being done in a Linux environment.

The output of uname -a:

Linux ubuntu 4.13.0-16-generic #19-Ubuntu SMP Wed Oct 11 18:35:14 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Thanks, Chris

beefstew commented 6 years ago

I noticed the merge of dev into master and am trying out commit 1e89142d0ecd1af6f2a91d6307c722e5783c8ea7. It appears to be working.