sbernard31 / lualwm2m Goto Github PK
View Code? Open in Web Editor NEWLua binding of liblwm2m / wakaama library (https://github.com/eclipse/wakaama). A client implementation of OMA Lightweight M2M / LWM2M protocol.
Lua binding of liblwm2m / wakaama library (https://github.com/eclipse/wakaama). A client implementation of OMA Lightweight M2M / LWM2M protocol.
A lot happens in 9 months, and lualwm2m is quite a lot behind wakaama now
Support the wakaama server api.
==28475== Invalid read of size 1
==28475== at 0x4C2B932: strlen (mc_replace_strmem.c:404)
==28475== by 0x5603B0D: strdup (strdup.c:41)
==28475== by 0x5F599E9: prv_read_resource (lua_object.c:105)
==28475== by 0x5F59C4D: prv_read (lua_object.c:146)
==28475== by 0x5F5B9A9: object_read (objects.c:168)
==28475== by 0x5F5F494: handle_dm_request (management.c:69)
==28475== by 0x5F5DED9: handle_request (packet.c:119)
==28475== by 0x5F5E084: lwm2m_handle_packet (packet.c:200)
==28475== by 0x5F59591: llwm_handle (lua_liblwm2m.c:279)
==28475== by 0x407E67: ??? (in /usr/bin/lua5.1)
==28475== by 0x410D56: ??? (in /usr/bin/lua5.1)
==28475== by 0x4082AC: ??? (in /usr/bin/lua5.1)
==28475== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==28475==
==28475==
==28475== Process terminating with default action of signal 11 (SIGSEGV)
==28475== Access not within mapped region at address 0x0
==28475== at 0x4C2B932: strlen (mc_replace_strmem.c:404)
==28475== by 0x5603B0D: strdup (strdup.c:41)
==28475== by 0x5F599E9: prv_read_resource (lua_object.c:105)
==28475== by 0x5F59C4D: prv_read (lua_object.c:146)
==28475== by 0x5F5B9A9: object_read (objects.c:168)
==28475== by 0x5F5F494: handle_dm_request (management.c:69)
==28475== by 0x5F5DED9: handle_request (packet.c:119)
==28475== by 0x5F5E084: lwm2m_handle_packet (packet.c:200)
==28475== by 0x5F59591: llwm_handle (lua_liblwm2m.c:279)
==28475== by 0x407E67: ??? (in /usr/bin/lua5.1)
==28475== by 0x410D56: ??? (in /usr/bin/lua5.1)
==28475== by 0x4082AC: ??? (in /usr/bin/lua5.1)
==28475== If you believe this happened as a result of a stack
==28475== overflow in your program's main thread (unlikely but
==28475== possible), you can try to increase the size of the
==28475== main thread stack using the --main-stacksize= flag.
==28475== The main thread stack size used in this run was 8388608.
==28475==
==28475== HEAP SUMMARY:
==28475== in use at exit: 98,804 bytes in 1,151 blocks
==28475== total heap usage: 2,041 allocs, 890 frees, 236,214 bytes allocated
==28475==
==28475== LEAK SUMMARY:
==28475== definitely lost: 0 bytes in 0 blocks
==28475== indirectly lost: 0 bytes in 0 blocks
==28475== possibly lost: 0 bytes in 0 blocks
==28475== still reachable: 98,804 bytes in 1,151 blocks
==28475== suppressed: 0 bytes in 0 blocks
==28475== Rerun with --leak-check=full to see details of leaked memory
==28475==
==28475== For counts of detected and suppressed errors, rerun with: -v
==28475== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 3 from 3)
[1] 28475 segmentation fault valgrind lua ./demo.lua
If the string provided by the lua lwm2m object is nil then you have a strdup of the adresse zero
BTW strdup can fail you should check for errors on every memory allocation calls (malloc, strdup,..)
NULL dereferences it's can lead to some security issues.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.