-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seb/master/hm2 watchdog #5
Seb/master/hm2 watchdog #5
Conversation
This is just for the convenience of getting a "Home All" button in Axis.
There's no point, we won't write out the "enable yourself" command to the watchdog module until hm2_write() or hm2_write_gpio(), and they also enable the watchdog.
Before this, the hm2_write_gpio() function would not enable the watchdog, which is a bug.
Warn once if we're about to make it too short (just like before). But use the natural code flow instead of a crazy state variable.
Enable it once and for all in hm2_watchdog_write(), instead of in each of its callers.
This is in preparation for petting the watchdog in this function.
All the error handling moves to hm2_watchdog_write() too. pet_watchdog() now does nothing but print a message about its own obsolescence.
But still export the function to HAL, for now. We should remove it before 2.7.
It's not needed any more, the hm2 write function pets the watchdog now.
Probably this also requires a change in pncconf so that it doesn't generate an addf of the removed pet function.
aside from that, things look pretty good. |
The hm2 write function pets the watchdog now.
pet_watchdog is no longer needed, the hm2 write function pets the watchdog now.
The regular hm2 read/write functions read and write everything, including gpios, and are already called in these hal files. The hm2 read_gpio/write_gpio functions are intended to be faster, reduced-capability functions for use in the fast thread.
This removes mention of the pet_watchdog function, and updates some out-of-date information about the watchdog.
Good call, i missed that. Pushed some more commits with that and some other stuff i'd missed last night. Do i have to make a new PR? |
No need to re-PR, just pushing to the PR'd branch is apparently enough. That's nice! |
I'll move the petting to tram and make another PR. |
nanopb.proto: add back in again
0b94620 Merge pull request LinuxCNC#6 from strahlex/mkwrapper c20524c machinetalk-protobuf: added home sequence field to EMC status message da257eb machinetalk-protobuf: added time units field, changed naming of velocity and acceleration fields a84b2ce machinetalk-protobuf: fixed wrong field id c748068 machinetalk-protobuf: added new field to EMC status a9745de preview: add source context type and fields 0060bef machinetalk-protobuf: added interp_name field aa8ad57 machinetalk-protobuf: fixed wrong enum d18fdce machinetalk-protobuf: added config fields to EMC status message 93b004c machinetalk-protobuf: added types for EMC error channel fb810fb machinetalk-protobof: update messages and type for EMC status 950765c machinetalk-protobuf: fixed enum aliasing 2f033cf machintalk-protobuf: added messages for EMC command 1690dfa machinetalk-protobuf: fixes in EMC status proto file 84cc9f9 machinetalk-protobuf: updated EMC status proto file 515e50e machinetalk-protobuf: work on definition file for EMC status a49d4d7 Merge pull request LinuxCNC#5 from mhaberler/master 6bf4e05 nanopb.proto: add back in again 8ac9d71 Merge pull request LinuxCNC#4 from mhaberler/master 58e89fa protos: remove nanopb.proto git-subtree-dir: src/machinetalk/proto git-subtree-split: 0b94620
commit 8ef2e7500a43fe93678b15cfaf61f0918a87b4a2 Author: Michael Haberler <git@mah.priv.at> Date: Tue Aug 26 20:46:18 2014 +0200 machinekit:: nanopb_generator.py import path change Conflicts: generator/nanopb_generator.py commit 2f2a509a75f5b023c5825383ed2a5226ad37e558 Author: Michael Haberler <git@mah.priv.at> Date: Tue Aug 26 20:35:24 2014 +0200 machinetalk: move descriptor.proto out of the way using the global one which comes with the protobuf package commit acd72917912aa99e9751766ec90e2d2156639a60 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Jan 24 17:33:01 2015 +0200 Publishing nanopb-0.3.2 commit d32d04ba1011806fe769f95dc2a88964f1102c6c Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Jan 23 21:29:29 2015 +0200 Fix encoded_size #defines for oneof messages. The sizes are represented as EncodedSize() instances, which cause max() operation to sort them by address instead of value. This caused pretty much random item to be selected for the maximum. Update issue 141 Status: FixedInGit commit 0286a0746ad6f6d525400f720e30d9d13913a556 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Jan 15 19:34:49 2015 +0200 Update changelog commit 24a45b0a9c1ea9c84d3f180cf1ffe35a600d611c Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Jan 15 19:18:48 2015 +0200 Fix clang compiler warning in intsizes unit test. commit e1c50496d9e7d1f54c4f9c344cca25bb85d61659 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Jan 15 18:58:08 2015 +0200 Release memory when overwriting oneof fields. Update issue 131 Status: FixedInGit commit f4b3a1c2027e330c52e661252acba6f69742fca6 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jan 11 19:47:27 2015 +0200 Add oneofs to AllTypes test case commit d2e023e3e5ef888e176292f149d1ba93ba270c94 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jan 11 19:46:15 2015 +0200 Bugfixes for oneof support. Fixes crashes / memory leaks when using pointer type fields. Also fixes initialization of which_oneof fields. commit 8d12fecc7e4fb6899eb0d013abe0d6a5e03447ce Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jan 11 19:38:05 2015 +0200 New generator options for oneofs: allow skipping or generating as normal 'optional' fields. The behaviour with no_unions:true is the same as of nanopb 0.3.1 and earlier. commit 8ef0392231c071a92ae78113763c0b1d61eafb1f Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Jan 7 18:59:44 2015 +0200 Fix generator error with OneOfs commit fa444be4243b2e1f0f6ee22798ddbf0c85e54422 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Jan 5 22:32:34 2015 +0200 Allow using 8/16/32/64 as values in int_size setting commit cc3c8732fd3f8505f46802dd54bd4a21c79b72aa Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jan 4 20:20:40 2015 +0200 Actually make the protoc version check work commit 7135e2797a80f224541080117313088273f02cad Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jan 4 20:00:37 2015 +0200 Only run oneof test when protoc >= 2.6 is available commit 77a71ceb6d8da3995c72bf8cb0656254c77deb8d Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jan 4 19:48:09 2015 +0200 Fix build failure commit 7713d43bc3d448358a04393c4e44dd12a768bdea Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jan 4 19:39:37 2015 +0200 Implement support for oneofs (C unions). Basic test included, should probably add an oneof to the AllTypes test also. Update issue 131 Status: Started commit a0f0440394ac3b38105dfad09366f95011c5d8d3 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jan 4 12:04:24 2015 +0200 Detect too large varint values when decoding. Because Issue #139 now allows limiting integer fields, it is good to check the values received from other protobuf libraries against the lower limits. commit 50c67ecec4895f65ba684e4b46b4b70980a5be6a Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jan 4 11:36:42 2015 +0200 Add int_size option for generator. This allows overriding the integer field types to e.g. uint8_t for saving RAM. Update issue 139 Status: FixedInGit commit b0d31468da7f644684be897cef5b0602ca10af0f Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Jan 3 10:59:19 2015 +0200 Change PB_RETURN_ERROR() macro to avoid compiler warnings. Update issue 140 Status: FixedInGit commit 7be7c7769f9532b2aca98e271540a565a6a321e6 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Dec 27 00:37:59 2014 +0200 Fix build failure due to missing dependency in SConscript commit 88b2efe0477f4f9e313b5d7307dfd347b6893376 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Dec 26 23:14:39 2014 +0200 Fix memory leaks with PB_ENABLE_MALLOC and certain submessage type combinations. There was a memory leak when: 1) A statically allocated submessage or 2) an extension field submessage contained A) a pointer-type field or B) a submessage that further contained a pointer-type field. This was because pb_release() didn't recurse into non-pointer fields. Update issue 138 Status: FixedInGit commit 500883048860cc98745d69ae1d16d85523cd5291 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Dec 26 23:13:07 2014 +0200 Initialize also extension fields to defaults in pb_decode(). This makes the behaviour more consistent with non-extension fields, and also makes sure that all 'found' fields of extensions are initially false. commit 58643217b1fa3eaf05768fabffac709cc8f277e8 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Dec 26 23:03:04 2014 +0200 Fix bug in backwards_compatibility test case. The memset() filled also the extensions field, which was just waiting for a crash to happen. commit 1515cfb5c24f64fd046c5b5f3cdfdcb153c72df7 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Dec 26 18:24:23 2014 +0200 Add testcase for releasing memory in submessages/extensions commit 418f7d88b3f58603fe03d0060b8aaba905ca56c8 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Dec 26 18:23:36 2014 +0200 Add support for POINTER type in extensions commit 980f899dd5ca1b4201536cdb56a723ba7777d82c Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Dec 26 17:43:38 2014 +0200 Include the field type in a comment for extension fields commit 0f3c0f79bc83c3678c325f7e8e17dd031acaf77f Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Dec 26 17:34:45 2014 +0200 Move malloc support to tests/common directory commit 8a28b70351baf09f2131fee2fc186a96d069cc2e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Dec 26 17:08:17 2014 +0200 Move malloc_wrappers.c to tests/common commit e5cbee84e12e87b342d7c57808b009387e1ba2bb Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Dec 22 22:52:36 2014 +0200 Verify build with protobuf-3.0.0, fix problems. Also updated descriptor.proto from protobuf-3.0.0. commit cfc517f36b3263bb583751f4cee0e58eeff98c5f Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Dec 22 20:52:40 2014 +0200 Add compilation option to disable struct packing. Update issue 136 Status: FixedInGit commit baf44b367f726484c315f204f1bf95ba40af86fa Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Sep 16 20:41:45 2014 +0300 Set version to nanopb-0.3.2-dev commit b947dc6e2c0d63a29e83ebf9c8af450d2531aef2 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Sep 11 19:36:14 2014 +0300 Publishing nanopb-0.3.1 commit 8d7deb4952c2a9b78f62b7fdc469d319344b187b Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Sep 11 19:26:32 2014 +0300 Update changelog commit 07e9ffb97b747b22250f66a2210898db57c266c1 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Sep 11 17:58:53 2014 +0300 Add a fuzz testing stub for ability to use external generators also commit d2099cc8f1adb33d427a44a5e32ed27b647c7168 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Sep 8 17:34:16 2014 +0300 Protect against size_t overflows in pb_dec_bytes/pb_dec_string. Possible consequences of bug: 1) Denial of service by causing a crash Possible when all of the following apply: - Untrusted data is passed to pb_decode() - The top-level message contains a static string field as the first field. Causes a single write of '0' byte to 1 byte before the message struct. 2) Remote code execution Possible when all of the following apply: - 64-bit platform - The message or a submessage contains a static/pointer string field. - Decoding directly from a custom pb_istream_t - bytes_left on the stream is set to larger than 4 GB Causes a write of up to 4 GB of data past the string field. 3) Possible heap corruption or remote code execution Possible when all of the following apply: - less than 64-bit platform - The message or a submessage contains a pointer-type bytes field. Causes a write of sizeof(pb_size_t) bytes of data past a 0-byte long malloc()ed buffer. On many malloc() implementations, this causes at most a crash. However, remote code execution through a controlled jump cannot be ruled out. -- Detailed analysis follows In the following consideration, I define "platform bitness" as equal to number of bits in size_t datatype. Therefore most 8-bit platforms are regarded as 16-bit for the purposes of this discussion. 1. The overflow in pb_dec_string The overflow happens in this computation: uint32_t size; size_t alloc_size; alloc_size = size + 1; There are two ways in which the overflow can occur: In the uint32_t addition, or in the cast to size_t. This depends on the platform bitness. On 32- and 64-bit platforms, the size has to be UINT32_MAX for the overflow to occur. In that case alloc_size will be 0. On 16-bit platforms, overflow will happen whenever size is more than UINT16_MAX, and resulting alloc_size is attacker controlled. For static fields, the alloc_size value is just checked against the field data size. For pointer fields, the alloc_size value is passed to malloc(). End result in both cases is the same, the storage is 0 or just a few bytes in length. On 16-bit platforms, another overflow occurs in the call to pb_read(), when passing the original size. An attacker will want the passed value to be larger than the alloc_size, therefore the only reasonable choice is to have size = UINT16_MAX and alloc_size = 0. Any larger multiple will truncate to the same values. At this point we have read atleast the tag and the string length of the message, i.e. atleast 3 bytes. The maximum initial value for stream bytes_left is SIZE_MAX, thus at this point at most SIZE_MAX-3 bytes are remaining. On 32-bit and 16-bit platforms this means that the size passed to pb_read() is always larger than the number of remaining bytes. This causes pb_read() to fail immediately, before reading any bytes. On 64-bit platforms, it is possible for the bytes_left value to be set to a value larger than UINT32_MAX, which is the wraparound point in size calculation. In this case pb_read() will succeed and write up to 4 GB of attacker controlled data over the RAM that comes after the string field. On all platforms, there is an unconditional write of a terminating null byte. Because the size of size_t typically reflects the size of the processor address space, a write at UINT16_MAX or UINT32_MAX bytes after the string field actually wraps back to before the string field. Consequently, on 32-bit and 16-bit platforms, the bug causes a single write of '0' byte at one byte before the string field. If the string field is in the middle of a message, this will just corrupt other data in the message struct. Because the message contents is attacker controlled anyway, this is a non-issue. However, if the string field is the first field in the top-level message, it can corrupt other data on the stack/heap before it. Typically a single '0' write at a location not controlled by attacker is enough only for a denial-of-service attack. When using pointer fields and malloc(), the attacker controlled alloc_size will cause a 0-size allocation to happen. By the same logic as before, on 32-bit and 16-bit platforms this causes a '0' byte write only. On 64-bit platforms, however, it will again allow up to 4 GB of malicious data to be written over memory, if the stream length allows the read. 2. The overflow in pb_dec_bytes This overflow happens in the PB_BYTES_ARRAY_T_ALLOCSIZE macro: The computation is done in size_t data type this time. This means that an overflow is possible only when n is larger than SIZE_MAX - offsetof(..). The offsetof value in this case is equal to sizeof(pb_size_t) bytes. Because the incoming size value is limited to 32 bits, no overflow can happen here on 64-bit platforms. The size will be passed to pb_read(). Like before, on 32-bit and 16-bit platforms the read will always fail before writing anything. This leaves only the write of bdest->size as exploitable. On statically allocated fields, the size field will always be allocated, regardless of alloc_size. In this case, no buffer overflow is possible here, but user code could possibly use the attacker controlled size value and read past a buffer. If the field is allocated through malloc(), this will allow a write of sizeof(pb_size_t) attacker controlled bytes to past a 0-byte long buffer. In typical malloc implementations, this will either fit in unused alignment padding area, or cause a heap corruption and a crash. Under very exceptional situation it could allow attacker to influence the behaviour of malloc(), possibly jumping into an attacker-controlled location and thus leading to remote code execution. commit d0466bdf439a190f4a17c502d8aeb40ef823b53e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Sep 8 17:33:05 2014 +0300 Add just-to-be-sure check to allocate_field(). This check will help to detect bugs earlier, and is quite lightweight compared to malloc() anyway. commit 5e3edb54159d98b90b4926d870d01648f54fc1d6 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Sep 6 18:56:34 2014 +0300 Fix memory leak with duplicated fields and PB_ENABLE_MALLOC. If a required or optional field appeared twice in the message data, pb_decode will overwrite the old data with new one. That is fine, but with submessage fields, it didn't release the allocated subfields before overwriting. This bug can manifest if all of the following conditions are true: 1. There is a message with a "optional" or "required" submessage field that has type:FT_POINTER. 2. The submessage contains atleast one field with type:FT_POINTER. 3. The message data to be decoded has the submessage field twice in it. commit 13a07e35b6b5f813078bde6a1a17d05f017bf714 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Sep 6 18:21:58 2014 +0300 Fix crash in pb_release() if called twice on same message. There was a double-free bug in pb_release() because it didn't set size fields to zero after deallocation. Most commonly this happens if pb_decode() fails, internally calls pb_release() and then application code also calls pb_release(). commit 0dce9ef635f8af1b9aa07a43f610295bca8954da Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Sep 6 19:01:11 2014 +0300 Add a better fuzz test. Attempts to verify all the properties defined in the security model, while also being portable and able to run on many platforms. commit 8189d538dd80a89bc6fa1672336b99c9c5cd076b Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Sep 7 20:31:36 2014 +0300 Add test case for simulated io errors. Update issue 126 Status: FixedInGit commit 38613acdb42731cc4bc80e93cfbc3cd126976c24 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Sep 7 19:49:26 2014 +0300 Add a few missing unit tests commit cdbf51db08d86ea024605078f21e8c61fe0e5fd3 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Sep 7 19:49:00 2014 +0300 Fix compilation error with generated initializers for repeated pointer fields commit d0299d87ec109c83480f857d2a1ce66d52834926 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Sep 7 19:25:09 2014 +0300 Code coverage results were ignoring the data from encode/decode unittests. Update issue 126 Status: Started commit d82a264c416f5ce64c611b48888eb84316e3445f Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Sep 4 21:19:54 2014 +0300 Update security model with regards to pointer fields commit df7234fd8b8779c9973b19b5a8fb22ee2e903982 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Aug 28 21:23:28 2014 +0300 Fix cyclic messages support in generator. Beginnings of test. Update issue 130 Status: Started commit 9e866b485319e2ede206b4eafa0b6235be0c4a38 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Aug 26 18:22:13 2014 +0300 Add missing * in migration docs commit 71b81ad5735e8db6f85795489a4bb2d8d7af8b7d Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Aug 26 18:20:48 2014 +0300 Setting version to 0.3.1-dev commit 8dede6095ede2281879b3484fa848210bb63dcfc Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Aug 26 18:08:31 2014 +0300 Publishing nanopb-0.3.0 commit e60dee698a617882659c84624d6a63d7941c4624 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Aug 26 18:08:01 2014 +0300 Update changelog commit 8a95311b51e6b64835ba8141594d8e804241377e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Aug 26 18:05:10 2014 +0300 Add pb_common.c to examples commit 3ed219382e55885a66a462db1cf06170ce80e606 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Aug 19 17:55:44 2014 +0300 Add #if guard for .pb.h version. The version in PB_PROTO_HEADER_VERSION can be bumped whenever there is a breaking change to the generated files, and it will then alert to the difference. Update issue 129 Status: FixedInGit commit be0b9e047a007685aa10a268f9bf856e9a52ef58 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Aug 18 21:11:10 2014 +0300 Rename poorly named identifier to avoid name conflicts. Update issue 106 Status: FixedInGit commit 62b4a8ecaac45ce62cc93e09261d60e6ceade1a9 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Aug 18 20:49:48 2014 +0300 Rename UNUSED() and STATIC_ASSERT() macros with PB_ prefix. This avoids possible namespace conflicts with other macros. commit 1dd9f1900fca0c137324c05a9421f1ba180b2470 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Aug 18 20:09:52 2014 +0300 Change the _count fields to use pb_size_t datatype. Update issue 82 Status: FixedInGit commit 0b517b07789049089e19b714311c596399d53f8e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Aug 10 17:44:27 2014 +0300 Fix windows build error in tests commit adf0ab81d400a49f5986d4de4b6e0dca617d5e13 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Aug 10 17:40:17 2014 +0300 Add document detailing migration from old versions commit 7edf250a627b56c43e44de546b73bf113d9dea59 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Aug 10 13:01:09 2014 +0300 Switch pb_encode to use the common iterator logic in pb_common.c Update issue 128 Status: FixedInGit commit a641e21b34aed824b6b919f7ab9937eaadf09473 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Aug 10 12:42:01 2014 +0300 Separate field iterator logic from pb_decode to pb_common. commit 0150b98be60b1e123fa51c561a908c234b6379fe Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Aug 9 22:18:24 2014 +0300 Setting version to 0.3.0-dev commit 2f05a35b5f5ce28650db096d61d7793ee982d073 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Aug 9 22:01:04 2014 +0300 Publishing nanopb-0.2.9 commit 4f76e649299828e88c300a6af9517e778c29e94e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Aug 4 19:13:39 2014 +0300 Update changelog commit ec3bff4ba110ffad31fccdbf74c4c180fc041414 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Aug 4 18:40:40 2014 +0300 Generate #defines for initializing message structures. Usage like: MyMessage foo = MyMessage_init_default; MyMessage_init_default will initialize to default values defined in .proto. MyMessage_init_zero will initialize to null/zero values. Same results as {} or {0}, but will avoid compiler warnings by initializing everything explicitly. Update issue 79 Status: FixedInGit commit 1d7f60fec30678ec7403786808026444a4b901e6 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jul 20 14:56:12 2014 +0300 Add skip_message option to generator. Update issue 121 Status: FixedInGit commit 5749606f5d2f0a0c64cb6e021b7bd40b74ce45ee Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jul 20 14:55:47 2014 +0300 Add support for inverted patterns in test framework. commit eaa3c7b157ffd2a308dfc6d35d79309a9aacbcef Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jul 20 14:44:41 2014 +0300 Cleanup and comment the code of network_server example. Update issue 123 Status: FixedInGit commit 3cf9668c755560a69e4858dea4f3c415bf807441 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jul 20 14:25:11 2014 +0300 Do not automatically add a dot with generator -e option. Now -e option in generator is more versatile. Especially it avoids double-dot problem with some build systems. Given foobar.proto, we now get: -e .pb => foobar.pb.c (default) -e _pb => foobar_pb.c -e '' => foobar.c Note that if you have used -e option previously, you will have to prepend . to the argument to get the same filenames as before. Update issue 122 Status: FixedInGit commit 7f97ad549e8ef2050c662b8160745402e84e8006 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jul 20 14:10:47 2014 +0300 Give better messages about the .options file path. Update issue 124 Status: FixedInGit commit f2f9f8a9ed2f59e4ed229f09fc95f9168cc4b473 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jul 20 14:02:56 2014 +0300 Fix problem with .options file and extension fields. The options for an extension field were being looked up under wrong name (MessageName instead of MessageName.fieldname). Fixed the problem and added regression test. Created a new subfolder for regression test cases. Update issue 125 Status: FixedInGit commit 788d2825b06426f50064dc5f29b07ce0be105b2b Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Jun 2 21:20:57 2014 +0300 Add unit tests for allocate_field(). commit 99bc1d4f97710cc71612869d3d7e0f501a4626ff Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Jun 2 21:12:38 2014 +0300 Make clearer that size = 0 in allocate_field() is not allowed. Back in design phase the code used realloc() for freeing the memory also. However, this is not entirely portable, and therefore the finished implementation used free() separately. There were some remnants of the size = 0 code in the allocate_field() code, which made it somewhat confusing. This change makes it clearer that size = 0 is not allowed (and not used by nanopb). commit 8a857a7f7519414c2294cc9f3286ebe5dba5a6f3 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Jun 2 21:09:06 2014 +0300 Don't use SIZE_MAX macro, as it is not in C89. Update issue 120 Status: FixedInGit commit 8611958a7f5ec16261cbacaf62a0ea92fd9dd314 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri May 30 13:45:48 2014 +0300 Add PB_PACKED_STRUCT support for Keil MDK-ARM toolchain Patch from Jon Read. Update issue 119 Status: FixedInGit commit 2e9797af5820c41645c98c4d156ae24961835d4e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue May 20 19:52:09 2014 +0300 Setting version to 0.2.9-dev commit 2c51fb7771687cdd75377094d09c6c01ef66e2cc Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue May 20 19:46:48 2014 +0300 Update changelog for 0.2.8 commit 916bcb3643b257ab2cb2cbc6a74da2c0cb74d275 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue May 20 19:34:28 2014 +0300 Publishing nanopb-0.2.8 commit 9cf788de5463e42aaf8a24ac35a3541fdaf8c517 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat May 17 20:28:33 2014 +0300 Fix bug in alltypes test case that made fuzzing difficult. commit 5ef128616baffd15bb904fc56f651d40901be429 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat May 17 20:06:55 2014 +0300 Fix security issue with PB_ENABLE_MALLOC. The multiplication in allocate_field could potentially overflow, leading to allocating too little memory. This could subsequently allow an attacker to cause a write past the buffer, overwriting other memory contents. The attack is possible if untrusted message data is decoded using nanopb, and the message type includes a pointer-type string or bytes field, or a repeated numeric field. Submessage fields are not affected. This issue only affects systems that have been compiled with PB_ENABLE_MALLOC enabled. Only version nanopb-0.2.7 is affected, as prior versions do not include this functionality. Update issue 117 Status: FixedInGit commit ba2ab9ea65d029b2560c461be317f3cf0d19eb3e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Apr 26 20:11:54 2014 +0300 Docs update, remove malloc from limitations list commit e6a57e512fb7ca0198ae2bb95616284387c7e4f9 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Apr 18 15:40:40 2014 +0300 Add option to not add timestamps to .pb.h and .pb.c preambles. Patch by rusnakp. Update issue 115 Status: FixedInGit commit d177af163995c8663991e000f129327cb4dc2505 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Apr 15 20:30:50 2014 +0300 Fix typos in scons command line options commit 3b36235cef2c1c5f3c79a33cb765de2ec1a2d01e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Apr 15 20:27:38 2014 +0300 Remove -O0 from tests CFLAGS so that optimized builds can be tested also commit 1d249a48ea979729d1b818847dfbea3316cc527e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Apr 9 19:39:12 2014 +0300 Fix bug in missing_fields test case commit 3e83d81b09606791b05715e6680ea57e65f06234 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Apr 9 19:28:57 2014 +0300 Use -fsanitize=undefined when running tests with clang commit 938c7ac3f302ccfa3044ce0720aeed9a4336ac0e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Apr 7 20:45:04 2014 +0300 Setting version to 0.2.8-dev commit 6d74c66adabf4bbe62f3c72bc5bb644eebf36d42 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Apr 7 20:30:42 2014 +0300 Publishing nanopb-0.2.7 commit c998ffe1178c26b513495c9144db24e89b9cbcc3 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Apr 7 20:30:12 2014 +0300 Update changelog commit a8de6acf2df23104be8907b9e3ed8647b33df6e2 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Apr 5 13:26:37 2014 +0300 Add rule for building coverage summary using lcov. Also modified a few tests to be more compatible with coverage information, so that they use the same pb_encode/decode.c instead of making a copy. commit 7880f308ea996292d5e28a81618370d79e2bdf26 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Apr 5 13:25:44 2014 +0300 Fix unused parameter warning when building without errmsg. commit b63e582bdb34b4727a8eb551fc72ee0476047a46 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Apr 5 11:26:39 2014 +0300 Add a convenience function pb_get_encoded_size() There is minimal size penalty from this, and it is probably much more intuitive to use than PB_OSTREAM_SIZING itself. This has been suggested before also, but I ended up refusing it back them. Reconsidering it now, I see that an intuitive API is much better than any amount of documentation explaining a non-intuitive API. Update issue 16 Status: FixedInGit commit e5b855fec5d2977971f96d817728c7a3ee8077b2 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Apr 5 11:11:05 2014 +0300 Add a 'found' field to pb_extension_t. Update issue 112 Status: FixedInGit commit 70dee34da6578ab76dbf00009357d679e154e04b Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Apr 2 21:08:15 2014 +0300 Add some missing 'static' specifiers Update issue 91 Status: FixedInGit commit 99434724d0375280abe44944b0c39f45991f26df Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Apr 2 20:59:01 2014 +0300 Fix splint warnings, add splint test case commit 6c90e824c4e8f54c71645b63b1ea33b1e028cb97 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Apr 1 16:47:53 2014 +0300 Fix compile error when default value given for extension field. Update issue 111 Status: FixedInGit commit f4949119ada32e28959e25e46b4f3314805b5ed1 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Mar 18 16:13:54 2014 +0200 Add stdlib.h to pb_syshdr.h for dynamic allocation commit 607cb998b5472ef1df461995b33694e9a54bef23 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Mar 17 17:25:58 2014 +0200 More configuration options for dynamic alloc commit ab62402059ff3752660ffc9f292cf210aef59be0 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Mar 16 15:52:19 2014 +0200 Documentation updates commit 108864963faf54762629a8bdf1f8bd614f0abd16 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Mar 15 09:39:27 2014 +0200 Finish the alltypes_pointer testcase, use valgrind if available. commit 9be2cfe968b4223f9d416aecd483f3b999bbab71 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Mar 15 08:45:58 2014 +0200 Get rid of pb_bytes_ptr_t, just allocate pb_bytes_array_t dynamically. This makes the internal logic much simpler, and also keeps the datatypes more similar between STATIC/POINTER cases. It will still be a bit cumbersome to use because of variable length array member. Macros PB_BYTES_ARRAY_T(n) and PB_BYTES_ARRAY_T_ALLOCSIZE(n) have been added to make life a bit easier. This has the drawback that it is no longer as easy to use externally allocated byte array as input for bytes field in pointer mode. However, this is still easy to do using callbacks, so it shouldn't be a large issue. commit 9c196b89ba04733529edfe970af6307a34de1662 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Mar 12 21:08:35 2014 +0200 Add pb_release() function commit bf61d2337b4107b2c37c35bb41c7b809d8f3feb9 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Mar 10 18:19:38 2014 +0200 More fixes for dynamic allocation commit 48ac4613724ef0bfb7b0db61871127575b1d9002 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Feb 25 19:58:11 2014 +0200 Bugfixes for dynamic allocation commit 011a30af9c015b1edd67420d9ca947e9fb499e73 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Feb 24 21:09:25 2014 +0200 Beginnings of malloc support in pb_decode commit 842c960d5df4b7715b0c7d2c00adeddf84389421 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Feb 15 17:15:54 2014 +0200 Setting version to 0.2.7-dev commit 7f397b067f660efe98855c80bdd2500167303737 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Feb 15 16:40:38 2014 +0200 Publishing nanopb-0.2.6 commit 586777b52feae5d10d2eb2fab9b2e366a5039731 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Feb 12 19:50:52 2014 +0200 Update changelog commit 542463dbaa3acae564e4a1eddf264e1fe226c38a Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Feb 12 19:43:04 2014 +0200 Move descriptor.proto to google/protobuf directory where it belongs. This fixes some interoperability problems when trying to compile nanopb.proto for e.g. the Google's C++ library. Update issue 104 Status: FixedInGit commit fe0bf121eb606d9accbc0fc8be6b1ff6fd5f6f27 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Feb 12 19:22:01 2014 +0200 Add test case for package names defined in .proto file. commit bd22cf27776f8981f1bf2fff4fcccf171a0ed2c8 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Feb 12 18:51:48 2014 +0200 Improve status/error reporting in generator. Update issue 105 Status: FixedInGit commit 057165966c8e1c47ede0b1e457282798f6a91065 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Feb 10 21:00:26 2014 +0200 Add AllTypes decoding test with callbacks. Update issue 99 Status: FixedInGit commit 235219a29588fd19787baa7ff948ab52ae2499a4 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Feb 9 19:28:50 2014 +0200 Add AllTypes encoding test for callbacks (issue #99) Still need to do the decoding side. commit d3ed0744d037e38ed8737a670fc05aec09f76379 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Feb 5 17:56:37 2014 +0200 Extreme negative integer constants are a bit nasty to define in C, just avoid the trouble in tests for now. commit 879860be196712990b1fb41cecd5a25229151e56 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Feb 4 20:34:57 2014 +0200 Add coments to places where STATIC_ASSERT is used. Update issue 96 Status: FixedInGit commit a2f8112166d73aaf7e8fc877f0310202319d4639 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Feb 4 20:24:44 2014 +0200 Add proper suffixes for integer default values. Update issue 102 Status: FixedInGit commit 5efeb392e00a57accb849904aba8dbc092c4076a Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Feb 4 20:11:52 2014 +0200 Add strict-aliasing GCC warnings for core commit a46ed9f47523712861741c4bb1c42382933467be Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Jan 3 11:17:39 2014 +0200 Fix problem with callback-type fields (issue #99). commit 843fc4b11a5dde584143d4a18deb41556b80daa7 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Jan 1 11:44:47 2014 +0200 Setting version to 0.2.6-dev commit 906c8283b5995eb7b27f4958a6a6502ae0deea07 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Jan 1 11:11:19 2014 +0200 Publishing nanopb-0.2.5 commit 4546bb92dc332ebbfb05a7517028f967b0657725 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Jan 1 11:20:07 2014 +0200 Fix Makefiles for the examples The default rules for make were being selected before our own rules and the .pb.c was not being built. commit 18e71bbfe2907fa759fad09e8c5c13655e33a590 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 29 22:08:13 2013 +0200 Fix bundled protoc detection in scons script commit 585cd0356ee1ef3c48cf958c307de7dc651123a3 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 29 21:47:38 2013 +0200 And same fixes on Mac also.. commit bb51ee655bdb80b176d4d7a87dce88d62b0e827a Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 29 21:43:22 2013 +0200 Make the Mac OS X package a .zip instead commit 125b49bf24883585d6826b8d72e14ccdfae41206 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 29 21:36:06 2013 +0200 Fix spaces in paths on Windows also commit da8210b947821b2002ce7dfb34eba213a2da73a3 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 29 21:11:57 2013 +0200 Fix handling spaces in directory name commit 10ef575d467db1f12406eee944212fde6c250089 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 29 20:53:39 2013 +0200 Fix build on Windows commit 7c9a8a132bc98741b97a186b1436f84e853f6fa3 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 29 20:48:30 2013 +0200 Fix protoc-gen-nanopb when the path contains spaces commit ae7b9a3bd3f54b5d0ba2db428944e38a3cd7b6a2 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 29 20:41:36 2013 +0200 Fix path change: compat/ -> extra/ commit 156139f11293691d97b06db826b7b8ff8327317b Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 29 20:31:02 2013 +0200 README updates commit 26f7341094bd023ff0e7b569eec8b207b9b8ab97 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 29 20:25:36 2013 +0200 Include platform name in also the directory name in binary pkgs commit 2b334015afd0bfd1888dc4b08f02778d96b2da8c Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Dec 3 20:35:29 2013 +0200 Add packaging script for Mac, add platform name to packages. commit 435ccbfdf7e48cfd809c41049d9edf4d6c267566 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Dec 3 20:10:48 2013 +0200 Fixes for pyinstaller commit b1cb035373fc3b6888e3664ca0ca3f37a9c0e639 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Dec 3 19:30:39 2013 +0200 Small fix for previous commit 6d0e0695d01bf1823a8aae2b3ec1d488e5215b76 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Dec 3 19:27:08 2013 +0200 Check for supported GCC CCFLAGS when building tests. commit dde71cb426addb6e847c2443ee1bd551d9eb0637 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Dec 3 18:44:25 2013 +0200 Make generator print errors to stderr. Otherwise they won't be visible when run as a protoc plugin. commit 1fc90ab4c4731ab521ee7f6b4f1f936f76520e2e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Nov 23 11:04:12 2013 +0200 Add a SCons tool for nanopb protos. This tool script is useful both for building the tests and also for use in other applications. commit 440a53f85965f35cd7bc401ef7e3fb9c4dfd1390 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 22:37:48 2013 +0200 Fix protoc-gen-nanopb in linux package commit 3bdbd4dc484945bfaa305d1df489a7805998139a Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 22:33:26 2013 +0200 Include libprotoc commit 8be8b7e41a27b0feb12b75fed42bee34258f1e35 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 22:25:52 2013 +0200 Linux archive commit 94422ad456a659b2d78cc4956b937e3d1f98a187 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 22:19:54 2013 +0200 Also include the manifest for MSVCR90.DLL commit 1d42f72f409b4a464b28d2c706f4d0fd213a8541 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 21:43:50 2013 +0200 Include MSVCR90.DLL also. commit 2abd27c91c05e124815b77898133e60ec4de16c9 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 21:20:12 2013 +0200 Include Visual C++ runtime in the Windows package. commit 6e087731535bc938d48c0db09b7cc602c4769e8f Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 20:57:50 2013 +0200 README updates commit d7cadaa46fe5979518a7ee2493250434f4e8ee40 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 20:37:18 2013 +0200 Windows build fixes commit d344bda28ae7a1a590790e1346a73a5d159ce7dd Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 20:25:18 2013 +0200 Fix protoc plugin path commit 05e2dc20f32016be40b11cc3e02e1e62bbc3944f Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 20:24:32 2013 +0200 Actually no, it was a portability hassle commit c61660b3ea88c88834a764d08763b3a85514014d Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 20:09:30 2013 +0200 Makefile tuning commit 45c1a32e5046fe9323d4fd0213b474a554b2bbed Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 20:04:29 2013 +0200 Rework the Makefiles to be compatible with binary packages. commit ef31774cd902a6f069b8f2b80b870167328f5acb Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 19:20:04 2013 +0200 Moving files around Renamed READMEs to README.txt to be more friendly for Windows users. commit 480b39cc0adc749ad81183fad2bfce6548c56604 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 19:09:13 2013 +0200 Package as .zip, convert linebreaks commit ec517e2108f4e7cc31cffc4fdc2a11cebfabfc66 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 17:37:29 2013 +0200 Add build script for windows package commit 8c2dda67a100237bc6cdb3b814012079be2b3534 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 16:42:52 2013 +0200 Add descriptor.proto to repository to avoid messing with protoc include path. commit 58b3a22d6d66c485bfd7c571c528e4c6d3619cb2 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 15:46:41 2013 +0200 Add script for making linux binary package commit 356535da9bd79252e5365a6e5648b7fcd28b367c Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 15:07:12 2013 +0200 Move the generator .proto files to a subdir, and get rid of precompiled versions. commit f4146edf01b8226709538a46919c666c37ebb50b Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 29 18:44:58 2013 +0200 Bring alltypes_pointer testcase up to date commit 8da15d8b802b55d04bdd84761e3c15f03b97a650 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 29 18:35:14 2013 +0200 Improve alltypes_pointer test case commit bc4ded3b4314e0fbd181b3cc01635052b56d2b19 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 29 18:34:57 2013 +0200 Fix missing error messages in pb_encode.c commit ef07635e3549b6a3ab6a6bafc12b7960ac6b1ab9 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Dec 9 19:25:19 2013 +0200 Rename encode_static_field -> encode_basic_field. commit 25516b059137be64735276bbe3a96029f4c926be Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Dec 9 19:19:12 2013 +0200 Organize allocation logic in generator, add pb_bytes_ptr_t. Allocation decision is now made before the field data type is decided. This way the data type decisions can more cleanly account for the allocation type, i.e. FT_DEFAULT logic etc. Added pb_bytes_ptr_t for pointer-allocated bytes-fields. There is no point generating separate structs for these, as they would all be of the same type. commit 414e637867c513ba9aa199e106c6d576e5b60287 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Dec 9 19:15:26 2013 +0200 Const-correctness and small cleanup. commit 4ae3b2e5661b154cd1f7e545f6052d271306ff25 Author: Martin Donath <scifish@gmail.com> Date: Sun Dec 8 23:25:32 2013 +0100 Generating and encoding messages with dynamic allocaiton commit 4f37c083d532a782e478b2cef6a02d028613564d Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 22 23:24:02 2013 +0200 Negative int32 values take 10 bytes now. commit ed93db08dc19290ac3232abd1e7480c3d18c84a5 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Dec 21 18:08:04 2013 +0200 Fix problem with decode_legacy test case on Windows. commit cd9004089fd4ae42cc68fd15f085f42c48494cb4 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Dec 21 12:41:20 2013 +0200 Add test for extreme integer values (INT32_MAX etc.) in AllTypes. commit ee5b12c537115b113ce01708d4a86a4062cdb182 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Dec 21 12:16:03 2013 +0200 Add PB_LTYPE_UVARINT to fix encoding of negative int32 values. Apparently int32 values that are negative must be cast into int64 first before being encoded. Because uint32 still needs to be cast to uint64, the cases for int32 and uint32 had to be separated. Update issue 97 Status: FixedInGit commit 9cc19a5e998d93fbe6d7a7c18fba1e37a36076d5 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Dec 21 12:14:20 2013 +0200 Modify the alltypes test to check re-encoding through protoc. This way we can verify that the message is encoded exactly the same way as the official protobuf implementation would do it. commit eff9e11150c0bfb6baf5d6bec2351034b72d95ed Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Nov 14 17:56:42 2013 +0200 Optimize the common case of 1-byte reads for varints. For PB_BUFFER_ONLY configuration, this gives 20% speedup without increasing code size. commit 5813144246f8f132f90bea117e578477914be0ea Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Nov 13 22:10:42 2013 +0200 Make tests build in a separate folder, add to gitignore commit 171d64734a34674cd648ac7b8569b4b21285fed4 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Nov 11 09:22:32 2013 +0200 Fix path in FindNanopb.cmake. Update issue 94 Status: FixedInGit commit 321ca6c1d5736edf6ec2ac0b97eae58227954fad Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Nov 7 16:47:14 2013 +0200 Setting version to 0.2.5-dev commit 935a26ab1cd2982e2478ac6f9b8decf7deb5fe5b Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Nov 7 16:44:41 2013 +0200 Publishing nanopb-0.2.4 commit d7af99434a15a508dc909ba053115fb112b0a247 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Nov 2 22:19:26 2013 +0200 Add dates to changelog commit 564bdc84488ac03120b6c51a14d9d7c2ee93a58c Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Nov 2 22:11:27 2013 +0200 Update changelog commit dcdd7f98fdb000859a9e2812174a817431b1af34 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Nov 2 22:05:49 2013 +0200 Generate #define tags for extension fields also. Update issue 93 Status: FixedInGit commit 287207841db5df93cf7ff9c71a5f1548deb26b09 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Oct 29 16:32:47 2013 +0200 Remove the NANOPB_INTERNALS functions from public API. These have been deprecated since nanopb-0.1.6 (some since 0.1.3). Equivalent functions with better interface are available in the API. Update issue 91 Status: FixedInGit commit 0074deba9a2ff99c877abe1293f72a9ed76f46c1 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Oct 29 16:24:50 2013 +0200 Declare static functions before use. For compliance with MISRA C rules (issue 91). commit 4d69cc2f3ef33af9b63495e59127884d48d12fb3 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Oct 29 16:19:07 2013 +0200 Cleanup of comments. commit c7b4ce0293a3e5bc1857ec76cee246d505b154e4 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Oct 29 15:44:35 2013 +0200 Add a definition of the security model to the documentation. commit cd3af3272d170f4990ef745316faa7600571ef4e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Oct 29 15:32:51 2013 +0200 Rename some internal functions to have unique names commit ed564186e14c79c767096f4b306dc3c6c5bd2e7d Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Oct 24 21:45:39 2013 +0300 Detect invalid sizes when encoding bytes fields. commit 86d698315608c372868bb55f6d2c609600ac8e41 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Oct 24 09:52:40 2013 +0300 Same fix for EncodedSize.__mul__ commit 0848255d4a4b7fa032e962592b15c57b30cd8483 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Oct 24 08:44:59 2013 +0300 Handle also longs in EncodedSize commit 51f0e47295d537a113804f250cddef37a57237a8 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Oct 23 21:21:43 2013 +0300 Fix the size of length prefix for messages in other files. commit 49bd3f35a0b6db0fa47d2e6e8fe9ddfb1bbcd58b Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Oct 23 21:01:11 2013 +0300 Generate message size #defines also for messages defined in multiple files. Add testcase for the same. commit 2bfd497eea857d19a09054c5c54f3718b08dc8c9 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Oct 20 21:49:55 2013 +0300 Define pb_size_t and pb_ssize_t data types. Use these in pb_field_t definition to clean up some #ifs, and also to prepare for solving issue #82. commit e83fbd18d3fa33af8a57198cddefe5fcef1b2f58 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Oct 20 21:42:00 2013 +0300 Check array max size when encoding. Update issue 90 Status: FixedInGit commit 388d4de833cf4e2127b2ab0489cb6b14ecc0cbb5 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Sep 26 10:23:37 2013 +0300 Add #defines for the maximum encoded message size. Update issue 89 Status: FixedInGit commit 2363af29a238fb4fa17474c979a0f45cde617a9e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Sep 18 12:47:32 2013 +0300 Setting version to 0.2.4-dev commit 283a8f36cb1ad989765e0dda2071a2a15a12af10 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Sep 18 12:44:46 2013 +0300 Publishing nanopb-0.2.3 commit 8accc25710cdb0839649d7356caa8aae1212cb8b Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Sep 13 13:41:57 2013 +0300 Update changelog commit 73142ba082e56b8c5ba75c055a20c200b623da83 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Sep 13 13:35:25 2013 +0300 Add a new very simple example commit f47410ea4b8ae43e19facd378be4cf1073e1813b Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Sep 13 12:59:31 2013 +0300 Move examples into subfolders, add READMEs commit fd9a79a06db00c6199a5dcaee22ed2cd8e3c3e9b Merge: 59cba0b 9ada7e7 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Sep 13 11:31:45 2013 +0300 Merge branch 'dev_get_rid_of_ternary_operator' commit 9ada7e752516260054525fca8e1f67efa321f682 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Sep 13 11:30:58 2013 +0300 Fine-tune the naming of new macros before merging into master. Requires re-generation of files generated with dev_get_rid_of_ternary_operator. commit 59cba0beeabac991b123dc6826e534f7838c5961 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Sep 11 17:33:50 2013 +0300 Expand extra_fields test to cover field skipping in case of streams. commit 152c2c910c9cda6e0beb1863c510c678300bdd7b Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Sep 11 16:51:53 2013 +0300 Disable warning about uint64_t (long long) commit 2b728150360f4c15512579ff53bc3247d3b8d083 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Sep 11 16:45:52 2013 +0300 Fix build error when path contains spaces commit 61ad04afd5236e2a6a0d4b4f2caa3bab4a820c99 Merge: 5b9ad17 9f93d39 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Sep 11 16:13:19 2013 +0300 Merge branch 'dev_tests_using_scons' commit 9f93d39f728c3e87b0ab482aa604c5cad4b1c86e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Sep 11 14:55:56 2013 +0300 Add tests for different compilation options commit d395768c8d3e63125c15950434fa255fb8c57717 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Sep 11 13:42:56 2013 +0300 Windows build fixes commit b9f14bddf778a5ed27e3289b90a0657fec3e1a53 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Sep 11 13:16:20 2013 +0300 Make all the tests ANSI C compatible. commit 840e213b9fa244bce4c67789971c02ce16e66295 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Sep 11 09:53:51 2013 +0300 Get rid of the ternary operator in the pb_field_t initialization. Some compilers where unable to detect that the ternary operator can be evaluated at the compile time. This commit does the evaluation on the Python side, which should fix the problem. The new .pb.c files are generated using PB_FIELD2() macro. The old PB_FIELD() macro remains, so that previously generated files keep working. commit e2e9980627810fe0ee2b8f119bcf651f0f318a8a Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Sep 10 22:34:54 2013 +0300 Move the rest of the tests to scons commit 0bbcb7b367998063637ee35c5d13716492cbf6a3 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Sep 10 20:54:29 2013 +0300 Compiler options for GCC, clang and tcc commit 696a01bf140e91661eae77663de99c78c95dcc73 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Sep 9 10:53:04 2013 +0300 Move the declarations of _pb_ostream_t and _pb_istream_t before first use. Otherwise Microsoft Visual C++ threats them as C++ classes instead of plain structs, forbidding use in C linkage functions. Thanks to Markus Schwarzenberg for the patch. Update issue 84 Status: Started commit f04ab838abd90fb70f7d6ef77fdacdf07f09ba4d Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Sep 10 17:44:32 2013 +0300 Build fixes for Windows/Visual C++ commit e681dd0d75a4b6a7974cc898477f3a138f7872c2 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Sep 10 12:39:39 2013 +0300 Add an example pb_syshdr.h file for platforms without C99. This allows building the tests easily on Visual C++ in C mode. Also add checks to pb.h that the defined integer types are of the proper sizes. This may prevent some difficult to debug problems later.. commit 4dccf28ba9c212b232147fd3823554d04b30c392 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Sep 10 11:34:57 2013 +0300 Convert more test cases to scons commit 5b9ad17dc2014d7506a7dde92281d8c36a1433e4 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Sep 9 10:53:04 2013 +0300 Move the declarations of _pb_ostream_t and _pb_istream_t before first use. Otherwise Microsoft Visual C++ threats them as C++ classes instead of plain structs, forbidding use in C linkage functions. Thanks to Markus Schwarzenberg for the patch. Update issue 84 Status: Started commit 4821e7f457ebd28aabcbdea726ebce11265f402f Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Sep 8 19:55:05 2013 +0300 Add support for running the nanopb generator as protoc plugin. Will be used to implement issue 47. For now, symlink nanopb_generator.py as protoc-gen-nanopb and use protoc --nanopb_out=. to call it. commit 262c62676cf740ec3ce14a22bde47b7968fec8f0 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Sep 8 17:52:03 2013 +0300 Start moving the tests into subfolders. Transition to SCons for build system for the tests. Only a few tests updated so far. Have to include all the rest before merging to mainline. Update issue 63 Status: Started commit d7f3a74388b4825d2c980c53d0a740ddfd0e4770 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Sep 8 11:05:20 2013 +0300 Handle unsupported extension field types more gracefully. Previously the generator would stop with NotImplementedException as soon as a required or repeated extension field is found. New behaviour is to just ignore the unsupported field and note that in a comment in the generated file. Furthermore, allow skipping of extension fields using the generator option (nanopb).type = FT_IGNORE. Update issue 83 Status: FixedInGit commit 4aef194a99705805153471c371e16a3633a4cc4e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Aug 18 22:12:31 2013 +0300 Setting version to 0.2.3-dev commit 81cf30034b420cc6fbd769b172a13f7e57796b7b Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Aug 18 22:11:38 2013 +0300 Publishing nanopb-0.2.2 commit dd726985086f85734fc674a6aaa227cd9c23d1ef Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Aug 8 20:45:30 2013 +0300 Update changelog commit f15093e8bde18bb9fc6f56a7f6fff727eef74e6c Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Aug 8 20:37:59 2013 +0300 Document field extensions support Update issue 17 Status: FixedInGit commit b663909fb6e86f0ae0f450523e72fb7fbfb719ab Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Aug 8 20:05:30 2013 +0300 Document PB_SYSTEM_HEADER commit ba40cacd3c4a60ccc9108d6acf7e813b1757dfd1 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Jul 22 19:00:04 2013 +0300 Finish the testcase for extensions commit 1f13e8cd2c5bb091677f35e53ae5757774e7d1ba Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Jul 22 18:59:15 2013 +0300 Fix bugs in extension support when multiple extension fields are present. commit 64947cb382271e2ab17dbf40ab634846d7d30ad9 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Jul 17 20:21:51 2013 +0300 Extension support implemented for decoder. Testing is still needed. Also only 'optional' extension fields are supported now, 'repeated' fields are not yet supported. commit 0343e2bcfe97748e8b1b93ecacb2e72fc0be7453 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Jul 17 19:29:06 2013 +0300 Add test case for extensions decoding commit ebddda9b5cdda5d082f07bbb6beb010f48c8f9b3 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Jul 17 19:23:19 2013 +0300 Implement extension support for the encoder commit 7c5e184c261bd5f5652993232f2125a6802004ab Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Jul 17 00:06:54 2013 +0300 Implement generator support for extension fields (no encoder/decoder support yet) commit f064c2c48a43b0c1b011d52f53d519d809b8cee7 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Jul 16 11:31:38 2013 +0300 Fix formatting in documentation commit 3c10e6fa71cbee85c540c0702a5a95333cd3be32 Author: Kent Ryhorchuk <kryhorchuk@xeralux.com> Date: Mon Jul 15 18:04:47 2013 -0700 Check for empty message type before incrementing required_field_index. If you have a message that defined as empty, but attempt to decode a message that has one or more unknown fields then pb_decode fails. The method used to count the number of required fields counts 1 required field because the default type of PB_LAST_FIELD is PB_HTYPE_REQUIRED. commit a01856f4ab7f51f129dda7387acca8a63d039105 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Jul 16 11:07:34 2013 +0300 Add test case for extra fields in AllTypes commit bb985e99274b537ee662d630b02664a3825d8829 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Jul 6 16:16:00 2013 +0300 Add pb_decode_delimited and pb_encode_delimited wrapper functions. Update issue 74 Status: FixedInGit commit 314460c2a518bdfc4e5dfb87992d907461a7c0e6 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Jul 6 15:55:15 2013 +0300 Clean up the comments in pb_encode.h and pb_decode.h commit 0ed3158560fe4b96d1d0df7f6b655409917f5989 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Jul 6 15:27:31 2013 +0300 Add section in pb.h for changing compilation settings. Update issue 76 Status: FixedInGit commit 4b705bf64b9a7b6bf0f61da3c84234847a7e8404 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Jul 6 15:25:42 2013 +0300 Add error message macros to API reference. commit 6e9e5329278b04a8e76d63f06fed2f3bfa80e2f8 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Jul 6 13:49:47 2013 +0300 Document the .options file usage. Also add note about the 'packed' message option being incompatible with CPUs that do not support unaligned access. Update issue 12 Status: FixedInGit Update issue 77 Status: FixedInGit commit 68dd0171bc51e871a522d21a40c35c08de0fb573 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Jul 6 13:01:21 2013 +0300 Switch the example project to use the new .options file commit a1cec46b3e824292b4ae22fa1f5c4faf9846196c Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Jun 3 22:46:19 2013 +0300 Include the field tags in the generated .pb.h file. Patch from Michael Haberler. commit bfd7cb36b90dfa22d37c918d8cdcdce60bc8af85 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Apr 14 10:07:46 2013 +0300 Setting version to 0.2.2-dev commit ef741ea530e4086344ed0ad0fc90f21c224b9503 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Apr 14 10:06:47 2013 +0300 Publishing nanopb-0.2.1 commit 26b52b79ad339c79aa1f0bbe09fcd1fce872b9b9 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Apr 14 10:04:46 2013 +0300 Update changelog commit d2063ff0b63b3b4f2f2081e61874a3c2487c4994 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Apr 14 09:46:39 2013 +0300 Handle unterminated strings when encoding. If the null terminator is not present, string will be limited to the data size of the field. If you are still using the pb_enc_string (deprecated since 0.1.3) from callbacks, now would be an excellent time to stop. The pb_field_t for the callback will not contain proper data_size. Use pb_encode_string() instead. Update issue 68 Status: FixedInGit commit 9939910833a9289b5913eff29f951195e7bc61c6 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Apr 14 09:26:42 2013 +0300 Fix bug with empty strings in repeated string callbacks. Fix suggested by Henrik Carlgren. Added also unit test for the bug. Update issue 73 Status: FixedInGit commit 6a022985845a0a50b32b7c1fb22f9aee1f675825 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Apr 8 11:00:28 2013 +0300 Avoid maybe-uninitialized warning Patch from dch. commit a968233777e0781cfd3dd7b9566b631dc576fed1 Author: dch <david.hotham@blueyonder.co.uk> Date: Sun Apr 7 15:28:51 2013 +0100 No need to include stdbool.h separately commit 710465a8e060d5ef7848a6f348f043435b1e39e0 Author: dch <david.hotham@blueyonder.co.uk> Date: Sun Apr 7 15:28:05 2013 +0100 __pragma keyword is only supported by recent Microsoft compilers commit 384e686fe6d7b7088cdbc4b44bc988eba3a21945 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Apr 2 20:01:31 2013 +0300 Do not generate has_ fields for callback fields. The arg field can be used to store the field presence from inside the callback. Furthermore, having the has_ field for encoding callbacks would be more annoying than useful. Update issue 70 Status: FixedInGit commit 214b0eae8aa011fa8b3e8a3dcc784f8d423aeffb Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Apr 2 19:55:21 2013 +0300 Change the callback function to use void**. NOTE: This change breaks backwards-compatibility by default. If you have old callback functions, you can define PB_OLD_CALLBACK_STYLE to retain the old behaviour. If you want to convert your old callbacks to new signature, you need to do the following: 1) Change decode callback argument to void **arg and encode callback argument to void * const *arg. 2) Change any reference to arg into *arg. The rationale for making the new behaviour the default is that it simplifies the common case of "allocate some memory in decode callback". Update issue 69 Status: FixedInGit commit 6f3740f74ed48daf51908676b203f1889455c17d Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Mar 13 15:34:12 2013 +0200 Fix warning on clang. Update issue 67 Status: FixedInGit commit 1396dce2aeeaea9f15ca5f495718bc85aeda8bd8 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Mar 13 15:22:00 2013 +0200 Add support for packed structures on IAR and MSVC. Update issue 66 Status: FixedInGit commit 6468f23d231343f1e08007621b8f3d566f0ec3ac Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Mar 9 23:03:09 2013 +0200 Make the generator options accept a file name in addition to format string. commit 03e53930723dce5793678365f350e94c2bc358dc Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Mar 9 14:56:34 2013 +0200 Add PB_SYSTEM_HEADER compile time option. This allows replacing the C99 standard include file names with a single system-specific file. It should provide all the necessary system functions (typedefs, memset, memcpy, strlen). Update issue 62 Status: FixedInGit commit d580b225e859ef0462e1d96553003eff2793b796 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Mar 9 14:52:38 2013 +0200 Rename pb_field_iterator_t field 'current' to 'pos'. This avoids a name clash when compiling as Linux kernel module. Update issue 60 Status: FixedInGit commit 03526471189711f6656dfa074fc6a8fd7f3d340b Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Mar 9 14:49:15 2013 +0200 Implement error message support for the encoder side. Update issue 7 Status: FixedInGit commit 9b6641ac643af4f301e05421f2b228084dcc869…
This brings in the key PB_MSG feature for runtime-message type id's of protos Squashed commit of the following: commit 76d87b0bd2fb80e20504bf201cc07b123df1e0a1 Author: Michael Haberler <git@mah.priv.at> Date: Tue Aug 26 20:46:18 2014 +0200 machinekit:: nanopb_generator.py import path change Conflicts: generator/nanopb_generator.py commit 3ab7556f22f1c064e81f8a0e78f6d58c61e60201 Author: Michael Haberler <git@mah.priv.at> Date: Tue Aug 26 20:35:24 2014 +0200 machinetalk: move descriptor.proto out of the way using the global one which comes with the protobuf package commit 62a7e4ff2b3487ec259de90db9215c4ad8838dd6 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Mar 22 11:19:43 2015 +0200 Add simple test case for message ids commit 8c14e736034b82d65b43db529161dd281a37816a Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Mar 22 11:17:57 2015 +0200 Use make_identifier() to create the name for FOO_MESSAGES define. This handles special charaters like in "my-file.proto" properly. Also use headerbasename instead of full path, so that compiling files with relative path doesn't create symbols like FOO/BAR/BAZ_MESSAGES. commit 942e82a82b88a073ad9654f54c11497e48b8fe09 Author: Michael Haberler <git@mah.priv.at> Date: Sun Mar 22 02:18:24 2015 +0100 nanopb_generator.py: emit macros for msgid message type id use commit 6db1857cb326653c39c930abb9a9a6d447564e1e Author: Michael Haberler <git@mah.priv.at> Date: Sun Mar 22 02:17:30 2015 +0100 nanopb.proto: add msgid message-level option commit ef422656a57b3f472b192691a40f48d0d72f2927 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Mar 7 10:25:09 2015 +0200 Fix oneof submessage initialization bug. Update issue 149 Status: FixedInGit commit 5c16a116ec2db9d19e42c5682cbfbf4f2b87ad87 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Feb 26 18:16:25 2015 +0200 Better error messages for syntax errors in .options file commit 4a6580726ec2a0b71d8f01133d5c38a469eac497 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Feb 26 17:33:36 2015 +0200 Fix generator error when long_names:false is combined with Oneofs. Update issue 147 Status: FixedInGit commit 651e97456b24524a73070c6ea1c9c2696c02bd53 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Feb 22 15:28:26 2015 +0200 Include libprotobuf in linux binary package. Previously this got included by bbfreeze, but apparently no more. Update issue 146 Status: FixedInGit commit b836ac29dd212f173b0607c826d23b3e3da3d61a Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Feb 13 18:57:46 2015 +0200 Lower required CMake version in example commit 93364463ac9ffc2206abe9d770152f073c671c2e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Feb 13 18:42:35 2015 +0200 Update cmake_simple example readme commit 7c00b90910d4e14e23e027eb951e6f2a8dcfae29 Author: Oliver Lee <oliverzlee@gmail.com> Date: Fri Feb 13 17:28:27 2015 +0100 Add simple example built with CMake commit 02bd49bc9379e3062a718b1c16d6e2c23ea2f1a0 Author: Oliver Lee <oliverzlee@gmail.com> Date: Fri Feb 13 17:14:00 2015 +0100 Fix search for Python 2 with CMake Do not assume that Python has already been found by CMake. Fix value of CMake variable PYTHON_EXECUTABLE if Python 3 was found. Change minimum supported Python version to 2.6. This fixes a bug introduced by this commit: d8d3b75e2e3b348d016f48cebc1be764061975d2 commit d8d3b75e2e3b348d016f48cebc1be764061975d2 Author: Oliver Lee <oliverzlee@gmail.com> Date: Fri Feb 13 10:26:31 2015 +0100 Updates for the CMake rule file. 1) Search explicitly for python2.7 In systems where python3 is default or in build cases where the user has already searched for and found python3 in CMake, store the python3 executable and search for python2.7. 2) Generate nanopb core protobuf files with CMake Generate python output files used in turn by the nanopb generator script. This removes the requirement of manually calling 'make' in the nanopb/generator/proto directory. 3) Use nanopb options file if it exists Look for nanopb options file and use in protobuf source and header generation if it exists. The options file must have the same name and path as the proto file, excluding the extension. commit 25b92c5b4e154130bf0787009046ea60175d28e8 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Jan 27 17:47:25 2015 +0200 Fix generator bug when oneof is first field in a message. Added test case for the same. Update issue 142 Status: FixedInGit commit 5aa8207ab1acf3b614b528b3d84e60d9266d35ae Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Jan 24 17:40:42 2015 +0200 Setting version to nanopb-0.3.3-dev commit acd72917912aa99e9751766ec90e2d2156639a60 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Jan 24 17:33:01 2015 +0200 Publishing nanopb-0.3.2 commit d32d04ba1011806fe769f95dc2a88964f1102c6c Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Jan 23 21:29:29 2015 +0200 Fix encoded_size #defines for oneof messages. The sizes are represented as EncodedSize() instances, which cause max() operation to sort them by address instead of value. This caused pretty much random item to be selected for the maximum. Update issue 141 Status: FixedInGit commit 0286a0746ad6f6d525400f720e30d9d13913a556 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Jan 15 19:34:49 2015 +0200 Update changelog commit 24a45b0a9c1ea9c84d3f180cf1ffe35a600d611c Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Jan 15 19:18:48 2015 +0200 Fix clang compiler warning in intsizes unit test. commit e1c50496d9e7d1f54c4f9c344cca25bb85d61659 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Jan 15 18:58:08 2015 +0200 Release memory when overwriting oneof fields. Update issue 131 Status: FixedInGit commit f4b3a1c2027e330c52e661252acba6f69742fca6 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jan 11 19:47:27 2015 +0200 Add oneofs to AllTypes test case commit d2e023e3e5ef888e176292f149d1ba93ba270c94 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jan 11 19:46:15 2015 +0200 Bugfixes for oneof support. Fixes crashes / memory leaks when using pointer type fields. Also fixes initialization of which_oneof fields. commit 8d12fecc7e4fb6899eb0d013abe0d6a5e03447ce Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jan 11 19:38:05 2015 +0200 New generator options for oneofs: allow skipping or generating as normal 'optional' fields. The behaviour with no_unions:true is the same as of nanopb 0.3.1 and earlier. commit 8ef0392231c071a92ae78113763c0b1d61eafb1f Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Jan 7 18:59:44 2015 +0200 Fix generator error with OneOfs commit fa444be4243b2e1f0f6ee22798ddbf0c85e54422 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Jan 5 22:32:34 2015 +0200 Allow using 8/16/32/64 as values in int_size setting commit cc3c8732fd3f8505f46802dd54bd4a21c79b72aa Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jan 4 20:20:40 2015 +0200 Actually make the protoc version check work commit 7135e2797a80f224541080117313088273f02cad Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jan 4 20:00:37 2015 +0200 Only run oneof test when protoc >= 2.6 is available commit 77a71ceb6d8da3995c72bf8cb0656254c77deb8d Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jan 4 19:48:09 2015 +0200 Fix build failure commit 7713d43bc3d448358a04393c4e44dd12a768bdea Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jan 4 19:39:37 2015 +0200 Implement support for oneofs (C unions). Basic test included, should probably add an oneof to the AllTypes test also. Update issue 131 Status: Started commit a0f0440394ac3b38105dfad09366f95011c5d8d3 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jan 4 12:04:24 2015 +0200 Detect too large varint values when decoding. Because Issue #139 now allows limiting integer fields, it is good to check the values received from other protobuf libraries against the lower limits. commit 50c67ecec4895f65ba684e4b46b4b70980a5be6a Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jan 4 11:36:42 2015 +0200 Add int_size option for generator. This allows overriding the integer field types to e.g. uint8_t for saving RAM. Update issue 139 Status: FixedInGit commit b0d31468da7f644684be897cef5b0602ca10af0f Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Jan 3 10:59:19 2015 +0200 Change PB_RETURN_ERROR() macro to avoid compiler warnings. Update issue 140 Status: FixedInGit commit 7be7c7769f9532b2aca98e271540a565a6a321e6 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Dec 27 00:37:59 2014 +0200 Fix build failure due to missing dependency in SConscript commit 88b2efe0477f4f9e313b5d7307dfd347b6893376 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Dec 26 23:14:39 2014 +0200 Fix memory leaks with PB_ENABLE_MALLOC and certain submessage type combinations. There was a memory leak when: 1) A statically allocated submessage or 2) an extension field submessage contained A) a pointer-type field or B) a submessage that further contained a pointer-type field. This was because pb_release() didn't recurse into non-pointer fields. Update issue 138 Status: FixedInGit commit 500883048860cc98745d69ae1d16d85523cd5291 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Dec 26 23:13:07 2014 +0200 Initialize also extension fields to defaults in pb_decode(). This makes the behaviour more consistent with non-extension fields, and also makes sure that all 'found' fields of extensions are initially false. commit 58643217b1fa3eaf05768fabffac709cc8f277e8 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Dec 26 23:03:04 2014 +0200 Fix bug in backwards_compatibility test case. The memset() filled also the extensions field, which was just waiting for a crash to happen. commit 1515cfb5c24f64fd046c5b5f3cdfdcb153c72df7 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Dec 26 18:24:23 2014 +0200 Add testcase for releasing memory in submessages/extensions commit 418f7d88b3f58603fe03d0060b8aaba905ca56c8 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Dec 26 18:23:36 2014 +0200 Add support for POINTER type in extensions commit 980f899dd5ca1b4201536cdb56a723ba7777d82c Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Dec 26 17:43:38 2014 +0200 Include the field type in a comment for extension fields commit 0f3c0f79bc83c3678c325f7e8e17dd031acaf77f Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Dec 26 17:34:45 2014 +0200 Move malloc support to tests/common directory commit 8a28b70351baf09f2131fee2fc186a96d069cc2e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Dec 26 17:08:17 2014 +0200 Move malloc_wrappers.c to tests/common commit e5cbee84e12e87b342d7c57808b009387e1ba2bb Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Dec 22 22:52:36 2014 +0200 Verify build with protobuf-3.0.0, fix problems. Also updated descriptor.proto from protobuf-3.0.0. commit cfc517f36b3263bb583751f4cee0e58eeff98c5f Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Dec 22 20:52:40 2014 +0200 Add compilation option to disable struct packing. Update issue 136 Status: FixedInGit commit baf44b367f726484c315f204f1bf95ba40af86fa Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Sep 16 20:41:45 2014 +0300 Set version to nanopb-0.3.2-dev commit b947dc6e2c0d63a29e83ebf9c8af450d2531aef2 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Sep 11 19:36:14 2014 +0300 Publishing nanopb-0.3.1 commit 8d7deb4952c2a9b78f62b7fdc469d319344b187b Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Sep 11 19:26:32 2014 +0300 Update changelog commit 07e9ffb97b747b22250f66a2210898db57c266c1 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Sep 11 17:58:53 2014 +0300 Add a fuzz testing stub for ability to use external generators also commit d2099cc8f1adb33d427a44a5e32ed27b647c7168 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Sep 8 17:34:16 2014 +0300 Protect against size_t overflows in pb_dec_bytes/pb_dec_string. Possible consequences of bug: 1) Denial of service by causing a crash Possible when all of the following apply: - Untrusted data is passed to pb_decode() - The top-level message contains a static string field as the first field. Causes a single write of '0' byte to 1 byte before the message struct. 2) Remote code execution Possible when all of the following apply: - 64-bit platform - The message or a submessage contains a static/pointer string field. - Decoding directly from a custom pb_istream_t - bytes_left on the stream is set to larger than 4 GB Causes a write of up to 4 GB of data past the string field. 3) Possible heap corruption or remote code execution Possible when all of the following apply: - less than 64-bit platform - The message or a submessage contains a pointer-type bytes field. Causes a write of sizeof(pb_size_t) bytes of data past a 0-byte long malloc()ed buffer. On many malloc() implementations, this causes at most a crash. However, remote code execution through a controlled jump cannot be ruled out. -- Detailed analysis follows In the following consideration, I define "platform bitness" as equal to number of bits in size_t datatype. Therefore most 8-bit platforms are regarded as 16-bit for the purposes of this discussion. 1. The overflow in pb_dec_string The overflow happens in this computation: uint32_t size; size_t alloc_size; alloc_size = size + 1; There are two ways in which the overflow can occur: In the uint32_t addition, or in the cast to size_t. This depends on the platform bitness. On 32- and 64-bit platforms, the size has to be UINT32_MAX for the overflow to occur. In that case alloc_size will be 0. On 16-bit platforms, overflow will happen whenever size is more than UINT16_MAX, and resulting alloc_size is attacker controlled. For static fields, the alloc_size value is just checked against the field data size. For pointer fields, the alloc_size value is passed to malloc(). End result in both cases is the same, the storage is 0 or just a few bytes in length. On 16-bit platforms, another overflow occurs in the call to pb_read(), when passing the original size. An attacker will want the passed value to be larger than the alloc_size, therefore the only reasonable choice is to have size = UINT16_MAX and alloc_size = 0. Any larger multiple will truncate to the same values. At this point we have read atleast the tag and the string length of the message, i.e. atleast 3 bytes. The maximum initial value for stream bytes_left is SIZE_MAX, thus at this point at most SIZE_MAX-3 bytes are remaining. On 32-bit and 16-bit platforms this means that the size passed to pb_read() is always larger than the number of remaining bytes. This causes pb_read() to fail immediately, before reading any bytes. On 64-bit platforms, it is possible for the bytes_left value to be set to a value larger than UINT32_MAX, which is the wraparound point in size calculation. In this case pb_read() will succeed and write up to 4 GB of attacker controlled data over the RAM that comes after the string field. On all platforms, there is an unconditional write of a terminating null byte. Because the size of size_t typically reflects the size of the processor address space, a write at UINT16_MAX or UINT32_MAX bytes after the string field actually wraps back to before the string field. Consequently, on 32-bit and 16-bit platforms, the bug causes a single write of '0' byte at one byte before the string field. If the string field is in the middle of a message, this will just corrupt other data in the message struct. Because the message contents is attacker controlled anyway, this is a non-issue. However, if the string field is the first field in the top-level message, it can corrupt other data on the stack/heap before it. Typically a single '0' write at a location not controlled by attacker is enough only for a denial-of-service attack. When using pointer fields and malloc(), the attacker controlled alloc_size will cause a 0-size allocation to happen. By the same logic as before, on 32-bit and 16-bit platforms this causes a '0' byte write only. On 64-bit platforms, however, it will again allow up to 4 GB of malicious data to be written over memory, if the stream length allows the read. 2. The overflow in pb_dec_bytes This overflow happens in the PB_BYTES_ARRAY_T_ALLOCSIZE macro: The computation is done in size_t data type this time. This means that an overflow is possible only when n is larger than SIZE_MAX - offsetof(..). The offsetof value in this case is equal to sizeof(pb_size_t) bytes. Because the incoming size value is limited to 32 bits, no overflow can happen here on 64-bit platforms. The size will be passed to pb_read(). Like before, on 32-bit and 16-bit platforms the read will always fail before writing anything. This leaves only the write of bdest->size as exploitable. On statically allocated fields, the size field will always be allocated, regardless of alloc_size. In this case, no buffer overflow is possible here, but user code could possibly use the attacker controlled size value and read past a buffer. If the field is allocated through malloc(), this will allow a write of sizeof(pb_size_t) attacker controlled bytes to past a 0-byte long buffer. In typical malloc implementations, this will either fit in unused alignment padding area, or cause a heap corruption and a crash. Under very exceptional situation it could allow attacker to influence the behaviour of malloc(), possibly jumping into an attacker-controlled location and thus leading to remote code execution. commit d0466bdf439a190f4a17c502d8aeb40ef823b53e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Sep 8 17:33:05 2014 +0300 Add just-to-be-sure check to allocate_field(). This check will help to detect bugs earlier, and is quite lightweight compared to malloc() anyway. commit 5e3edb54159d98b90b4926d870d01648f54fc1d6 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Sep 6 18:56:34 2014 +0300 Fix memory leak with duplicated fields and PB_ENABLE_MALLOC. If a required or optional field appeared twice in the message data, pb_decode will overwrite the old data with new one. That is fine, but with submessage fields, it didn't release the allocated subfields before overwriting. This bug can manifest if all of the following conditions are true: 1. There is a message with a "optional" or "required" submessage field that has type:FT_POINTER. 2. The submessage contains atleast one field with type:FT_POINTER. 3. The message data to be decoded has the submessage field twice in it. commit 13a07e35b6b5f813078bde6a1a17d05f017bf714 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Sep 6 18:21:58 2014 +0300 Fix crash in pb_release() if called twice on same message. There was a double-free bug in pb_release() because it didn't set size fields to zero after deallocation. Most commonly this happens if pb_decode() fails, internally calls pb_release() and then application code also calls pb_release(). commit 0dce9ef635f8af1b9aa07a43f610295bca8954da Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Sep 6 19:01:11 2014 +0300 Add a better fuzz test. Attempts to verify all the properties defined in the security model, while also being portable and able to run on many platforms. commit 8189d538dd80a89bc6fa1672336b99c9c5cd076b Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Sep 7 20:31:36 2014 +0300 Add test case for simulated io errors. Update issue 126 Status: FixedInGit commit 38613acdb42731cc4bc80e93cfbc3cd126976c24 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Sep 7 19:49:26 2014 +0300 Add a few missing unit tests commit cdbf51db08d86ea024605078f21e8c61fe0e5fd3 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Sep 7 19:49:00 2014 +0300 Fix compilation error with generated initializers for repeated pointer fields commit d0299d87ec109c83480f857d2a1ce66d52834926 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Sep 7 19:25:09 2014 +0300 Code coverage results were ignoring the data from encode/decode unittests. Update issue 126 Status: Started commit d82a264c416f5ce64c611b48888eb84316e3445f Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Sep 4 21:19:54 2014 +0300 Update security model with regards to pointer fields commit df7234fd8b8779c9973b19b5a8fb22ee2e903982 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Aug 28 21:23:28 2014 +0300 Fix cyclic messages support in generator. Beginnings of test. Update issue 130 Status: Started commit 9e866b485319e2ede206b4eafa0b6235be0c4a38 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Aug 26 18:22:13 2014 +0300 Add missing * in migration docs commit 71b81ad5735e8db6f85795489a4bb2d8d7af8b7d Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Aug 26 18:20:48 2014 +0300 Setting version to 0.3.1-dev commit 8dede6095ede2281879b3484fa848210bb63dcfc Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Aug 26 18:08:31 2014 +0300 Publishing nanopb-0.3.0 commit e60dee698a617882659c84624d6a63d7941c4624 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Aug 26 18:08:01 2014 +0300 Update changelog commit 8a95311b51e6b64835ba8141594d8e804241377e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Aug 26 18:05:10 2014 +0300 Add pb_common.c to examples commit 3ed219382e55885a66a462db1cf06170ce80e606 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Aug 19 17:55:44 2014 +0300 Add #if guard for .pb.h version. The version in PB_PROTO_HEADER_VERSION can be bumped whenever there is a breaking change to the generated files, and it will then alert to the difference. Update issue 129 Status: FixedInGit commit be0b9e047a007685aa10a268f9bf856e9a52ef58 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Aug 18 21:11:10 2014 +0300 Rename poorly named identifier to avoid name conflicts. Update issue 106 Status: FixedInGit commit 62b4a8ecaac45ce62cc93e09261d60e6ceade1a9 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Aug 18 20:49:48 2014 +0300 Rename UNUSED() and STATIC_ASSERT() macros with PB_ prefix. This avoids possible namespace conflicts with other macros. commit 1dd9f1900fca0c137324c05a9421f1ba180b2470 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Aug 18 20:09:52 2014 +0300 Change the _count fields to use pb_size_t datatype. Update issue 82 Status: FixedInGit commit 0b517b07789049089e19b714311c596399d53f8e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Aug 10 17:44:27 2014 +0300 Fix windows build error in tests commit adf0ab81d400a49f5986d4de4b6e0dca617d5e13 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Aug 10 17:40:17 2014 +0300 Add document detailing migration from old versions commit 7edf250a627b56c43e44de546b73bf113d9dea59 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Aug 10 13:01:09 2014 +0300 Switch pb_encode to use the common iterator logic in pb_common.c Update issue 128 Status: FixedInGit commit a641e21b34aed824b6b919f7ab9937eaadf09473 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Aug 10 12:42:01 2014 +0300 Separate field iterator logic from pb_decode to pb_common. commit 0150b98be60b1e123fa51c561a908c234b6379fe Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Aug 9 22:18:24 2014 +0300 Setting version to 0.3.0-dev commit 2f05a35b5f5ce28650db096d61d7793ee982d073 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Aug 9 22:01:04 2014 +0300 Publishing nanopb-0.2.9 commit 4f76e649299828e88c300a6af9517e778c29e94e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Aug 4 19:13:39 2014 +0300 Update changelog commit ec3bff4ba110ffad31fccdbf74c4c180fc041414 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Aug 4 18:40:40 2014 +0300 Generate #defines for initializing message structures. Usage like: MyMessage foo = MyMessage_init_default; MyMessage_init_default will initialize to default values defined in .proto. MyMessage_init_zero will initialize to null/zero values. Same results as {} or {0}, but will avoid compiler warnings by initializing everything explicitly. Update issue 79 Status: FixedInGit commit 1d7f60fec30678ec7403786808026444a4b901e6 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jul 20 14:56:12 2014 +0300 Add skip_message option to generator. Update issue 121 Status: FixedInGit commit 5749606f5d2f0a0c64cb6e021b7bd40b74ce45ee Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jul 20 14:55:47 2014 +0300 Add support for inverted patterns in test framework. commit eaa3c7b157ffd2a308dfc6d35d79309a9aacbcef Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jul 20 14:44:41 2014 +0300 Cleanup and comment the code of network_server example. Update issue 123 Status: FixedInGit commit 3cf9668c755560a69e4858dea4f3c415bf807441 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jul 20 14:25:11 2014 +0300 Do not automatically add a dot with generator -e option. Now -e option in generator is more versatile. Especially it avoids double-dot problem with some build systems. Given foobar.proto, we now get: -e .pb => foobar.pb.c (default) -e _pb => foobar_pb.c -e '' => foobar.c Note that if you have used -e option previously, you will have to prepend . to the argument to get the same filenames as before. Update issue 122 Status: FixedInGit commit 7f97ad549e8ef2050c662b8160745402e84e8006 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jul 20 14:10:47 2014 +0300 Give better messages about the .options file path. Update issue 124 Status: FixedInGit commit f2f9f8a9ed2f59e4ed229f09fc95f9168cc4b473 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Jul 20 14:02:56 2014 +0300 Fix problem with .options file and extension fields. The options for an extension field were being looked up under wrong name (MessageName instead of MessageName.fieldname). Fixed the problem and added regression test. Created a new subfolder for regression test cases. Update issue 125 Status: FixedInGit commit 788d2825b06426f50064dc5f29b07ce0be105b2b Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Jun 2 21:20:57 2014 +0300 Add unit tests for allocate_field(). commit 99bc1d4f97710cc71612869d3d7e0f501a4626ff Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Jun 2 21:12:38 2014 +0300 Make clearer that size = 0 in allocate_field() is not allowed. Back in design phase the code used realloc() for freeing the memory also. However, this is not entirely portable, and therefore the finished implementation used free() separately. There were some remnants of the size = 0 code in the allocate_field() code, which made it somewhat confusing. This change makes it clearer that size = 0 is not allowed (and not used by nanopb). commit 8a857a7f7519414c2294cc9f3286ebe5dba5a6f3 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Jun 2 21:09:06 2014 +0300 Don't use SIZE_MAX macro, as it is not in C89. Update issue 120 Status: FixedInGit commit 8611958a7f5ec16261cbacaf62a0ea92fd9dd314 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri May 30 13:45:48 2014 +0300 Add PB_PACKED_STRUCT support for Keil MDK-ARM toolchain Patch from Jon Read. Update issue 119 Status: FixedInGit commit 2e9797af5820c41645c98c4d156ae24961835d4e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue May 20 19:52:09 2014 +0300 Setting version to 0.2.9-dev commit 2c51fb7771687cdd75377094d09c6c01ef66e2cc Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue May 20 19:46:48 2014 +0300 Update changelog for 0.2.8 commit 916bcb3643b257ab2cb2cbc6a74da2c0cb74d275 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue May 20 19:34:28 2014 +0300 Publishing nanopb-0.2.8 commit 9cf788de5463e42aaf8a24ac35a3541fdaf8c517 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat May 17 20:28:33 2014 +0300 Fix bug in alltypes test case that made fuzzing difficult. commit 5ef128616baffd15bb904fc56f651d40901be429 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat May 17 20:06:55 2014 +0300 Fix security issue with PB_ENABLE_MALLOC. The multiplication in allocate_field could potentially overflow, leading to allocating too little memory. This could subsequently allow an attacker to cause a write past the buffer, overwriting other memory contents. The attack is possible if untrusted message data is decoded using nanopb, and the message type includes a pointer-type string or bytes field, or a repeated numeric field. Submessage fields are not affected. This issue only affects systems that have been compiled with PB_ENABLE_MALLOC enabled. Only version nanopb-0.2.7 is affected, as prior versions do not include this functionality. Update issue 117 Status: FixedInGit commit ba2ab9ea65d029b2560c461be317f3cf0d19eb3e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Apr 26 20:11:54 2014 +0300 Docs update, remove malloc from limitations list commit e6a57e512fb7ca0198ae2bb95616284387c7e4f9 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Apr 18 15:40:40 2014 +0300 Add option to not add timestamps to .pb.h and .pb.c preambles. Patch by rusnakp. Update issue 115 Status: FixedInGit commit d177af163995c8663991e000f129327cb4dc2505 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Apr 15 20:30:50 2014 +0300 Fix typos in scons command line options commit 3b36235cef2c1c5f3c79a33cb765de2ec1a2d01e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Apr 15 20:27:38 2014 +0300 Remove -O0 from tests CFLAGS so that optimized builds can be tested also commit 1d249a48ea979729d1b818847dfbea3316cc527e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Apr 9 19:39:12 2014 +0300 Fix bug in missing_fields test case commit 3e83d81b09606791b05715e6680ea57e65f06234 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Apr 9 19:28:57 2014 +0300 Use -fsanitize=undefined when running tests with clang commit 938c7ac3f302ccfa3044ce0720aeed9a4336ac0e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Apr 7 20:45:04 2014 +0300 Setting version to 0.2.8-dev commit 6d74c66adabf4bbe62f3c72bc5bb644eebf36d42 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Apr 7 20:30:42 2014 +0300 Publishing nanopb-0.2.7 commit c998ffe1178c26b513495c9144db24e89b9cbcc3 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Apr 7 20:30:12 2014 +0300 Update changelog commit a8de6acf2df23104be8907b9e3ed8647b33df6e2 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Apr 5 13:26:37 2014 +0300 Add rule for building coverage summary using lcov. Also modified a few tests to be more compatible with coverage information, so that they use the same pb_encode/decode.c instead of making a copy. commit 7880f308ea996292d5e28a81618370d79e2bdf26 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Apr 5 13:25:44 2014 +0300 Fix unused parameter warning when building without errmsg. commit b63e582bdb34b4727a8eb551fc72ee0476047a46 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Apr 5 11:26:39 2014 +0300 Add a convenience function pb_get_encoded_size() There is minimal size penalty from this, and it is probably much more intuitive to use than PB_OSTREAM_SIZING itself. This has been suggested before also, but I ended up refusing it back them. Reconsidering it now, I see that an intuitive API is much better than any amount of documentation explaining a non-intuitive API. Update issue 16 Status: FixedInGit commit e5b855fec5d2977971f96d817728c7a3ee8077b2 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Apr 5 11:11:05 2014 +0300 Add a 'found' field to pb_extension_t. Update issue 112 Status: FixedInGit commit 70dee34da6578ab76dbf00009357d679e154e04b Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Apr 2 21:08:15 2014 +0300 Add some missing 'static' specifiers Update issue 91 Status: FixedInGit commit 99434724d0375280abe44944b0c39f45991f26df Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Apr 2 20:59:01 2014 +0300 Fix splint warnings, add splint test case commit 6c90e824c4e8f54c71645b63b1ea33b1e028cb97 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Apr 1 16:47:53 2014 +0300 Fix compile error when default value given for extension field. Update issue 111 Status: FixedInGit commit f4949119ada32e28959e25e46b4f3314805b5ed1 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Mar 18 16:13:54 2014 +0200 Add stdlib.h to pb_syshdr.h for dynamic allocation commit 607cb998b5472ef1df461995b33694e9a54bef23 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Mar 17 17:25:58 2014 +0200 More configuration options for dynamic alloc commit ab62402059ff3752660ffc9f292cf210aef59be0 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Mar 16 15:52:19 2014 +0200 Documentation updates commit 108864963faf54762629a8bdf1f8bd614f0abd16 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Mar 15 09:39:27 2014 +0200 Finish the alltypes_pointer testcase, use valgrind if available. commit 9be2cfe968b4223f9d416aecd483f3b999bbab71 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Mar 15 08:45:58 2014 +0200 Get rid of pb_bytes_ptr_t, just allocate pb_bytes_array_t dynamically. This makes the internal logic much simpler, and also keeps the datatypes more similar between STATIC/POINTER cases. It will still be a bit cumbersome to use because of variable length array member. Macros PB_BYTES_ARRAY_T(n) and PB_BYTES_ARRAY_T_ALLOCSIZE(n) have been added to make life a bit easier. This has the drawback that it is no longer as easy to use externally allocated byte array as input for bytes field in pointer mode. However, this is still easy to do using callbacks, so it shouldn't be a large issue. commit 9c196b89ba04733529edfe970af6307a34de1662 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Mar 12 21:08:35 2014 +0200 Add pb_release() function commit bf61d2337b4107b2c37c35bb41c7b809d8f3feb9 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Mar 10 18:19:38 2014 +0200 More fixes for dynamic allocation commit 48ac4613724ef0bfb7b0db61871127575b1d9002 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Feb 25 19:58:11 2014 +0200 Bugfixes for dynamic allocation commit 011a30af9c015b1edd67420d9ca947e9fb499e73 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Feb 24 21:09:25 2014 +0200 Beginnings of malloc support in pb_decode commit 842c960d5df4b7715b0c7d2c00adeddf84389421 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Feb 15 17:15:54 2014 +0200 Setting version to 0.2.7-dev commit 7f397b067f660efe98855c80bdd2500167303737 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Feb 15 16:40:38 2014 +0200 Publishing nanopb-0.2.6 commit 586777b52feae5d10d2eb2fab9b2e366a5039731 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Feb 12 19:50:52 2014 +0200 Update changelog commit 542463dbaa3acae564e4a1eddf264e1fe226c38a Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Feb 12 19:43:04 2014 +0200 Move descriptor.proto to google/protobuf directory where it belongs. This fixes some interoperability problems when trying to compile nanopb.proto for e.g. the Google's C++ library. Update issue 104 Status: FixedInGit commit fe0bf121eb606d9accbc0fc8be6b1ff6fd5f6f27 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Feb 12 19:22:01 2014 +0200 Add test case for package names defined in .proto file. commit bd22cf27776f8981f1bf2fff4fcccf171a0ed2c8 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Feb 12 18:51:48 2014 +0200 Improve status/error reporting in generator. Update issue 105 Status: FixedInGit commit 057165966c8e1c47ede0b1e457282798f6a91065 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Feb 10 21:00:26 2014 +0200 Add AllTypes decoding test with callbacks. Update issue 99 Status: FixedInGit commit 235219a29588fd19787baa7ff948ab52ae2499a4 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Feb 9 19:28:50 2014 +0200 Add AllTypes encoding test for callbacks (issue #99) Still need to do the decoding side. commit d3ed0744d037e38ed8737a670fc05aec09f76379 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Feb 5 17:56:37 2014 +0200 Extreme negative integer constants are a bit nasty to define in C, just avoid the trouble in tests for now. commit 879860be196712990b1fb41cecd5a25229151e56 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Feb 4 20:34:57 2014 +0200 Add coments to places where STATIC_ASSERT is used. Update issue 96 Status: FixedInGit commit a2f8112166d73aaf7e8fc877f0310202319d4639 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Feb 4 20:24:44 2014 +0200 Add proper suffixes for integer default values. Update issue 102 Status: FixedInGit commit 5efeb392e00a57accb849904aba8dbc092c4076a Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Feb 4 20:11:52 2014 +0200 Add strict-aliasing GCC warnings for core commit a46ed9f47523712861741c4bb1c42382933467be Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Jan 3 11:17:39 2014 +0200 Fix problem with callback-type fields (issue #99). commit 843fc4b11a5dde584143d4a18deb41556b80daa7 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Jan 1 11:44:47 2014 +0200 Setting version to 0.2.6-dev commit 906c8283b5995eb7b27f4958a6a6502ae0deea07 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Jan 1 11:11:19 2014 +0200 Publishing nanopb-0.2.5 commit 4546bb92dc332ebbfb05a7517028f967b0657725 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Jan 1 11:20:07 2014 +0200 Fix Makefiles for the examples The default rules for make were being selected before our own rules and the .pb.c was not being built. commit 18e71bbfe2907fa759fad09e8c5c13655e33a590 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 29 22:08:13 2013 +0200 Fix bundled protoc detection in scons script commit 585cd0356ee1ef3c48cf958c307de7dc651123a3 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 29 21:47:38 2013 +0200 And same fixes on Mac also.. commit bb51ee655bdb80b176d4d7a87dce88d62b0e827a Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 29 21:43:22 2013 +0200 Make the Mac OS X package a .zip instead commit 125b49bf24883585d6826b8d72e14ccdfae41206 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 29 21:36:06 2013 +0200 Fix spaces in paths on Windows also commit da8210b947821b2002ce7dfb34eba213a2da73a3 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 29 21:11:57 2013 +0200 Fix handling spaces in directory name commit 10ef575d467db1f12406eee944212fde6c250089 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 29 20:53:39 2013 +0200 Fix build on Windows commit 7c9a8a132bc98741b97a186b1436f84e853f6fa3 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 29 20:48:30 2013 +0200 Fix protoc-gen-nanopb when the path contains spaces commit ae7b9a3bd3f54b5d0ba2db428944e38a3cd7b6a2 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 29 20:41:36 2013 +0200 Fix path change: compat/ -> extra/ commit 156139f11293691d97b06db826b7b8ff8327317b Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 29 20:31:02 2013 +0200 README updates commit 26f7341094bd023ff0e7b569eec8b207b9b8ab97 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 29 20:25:36 2013 +0200 Include platform name in also the directory name in binary pkgs commit 2b334015afd0bfd1888dc4b08f02778d96b2da8c Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Dec 3 20:35:29 2013 +0200 Add packaging script for Mac, add platform name to packages. commit 435ccbfdf7e48cfd809c41049d9edf4d6c267566 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Dec 3 20:10:48 2013 +0200 Fixes for pyinstaller commit b1cb035373fc3b6888e3664ca0ca3f37a9c0e639 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Dec 3 19:30:39 2013 +0200 Small fix for previous commit 6d0e0695d01bf1823a8aae2b3ec1d488e5215b76 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Dec 3 19:27:08 2013 +0200 Check for supported GCC CCFLAGS when building tests. commit dde71cb426addb6e847c2443ee1bd551d9eb0637 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Dec 3 18:44:25 2013 +0200 Make generator print errors to stderr. Otherwise they won't be visible when run as a protoc plugin. commit 1fc90ab4c4731ab521ee7f6b4f1f936f76520e2e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Nov 23 11:04:12 2013 +0200 Add a SCons tool for nanopb protos. This tool script is useful both for building the tests and also for use in other applications. commit 440a53f85965f35cd7bc401ef7e3fb9c4dfd1390 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 22:37:48 2013 +0200 Fix protoc-gen-nanopb in linux package commit 3bdbd4dc484945bfaa305d1df489a7805998139a Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 22:33:26 2013 +0200 Include libprotoc commit 8be8b7e41a27b0feb12b75fed42bee34258f1e35 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 22:25:52 2013 +0200 Linux archive commit 94422ad456a659b2d78cc4956b937e3d1f98a187 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 22:19:54 2013 +0200 Also include the manifest for MSVCR90.DLL commit 1d42f72f409b4a464b28d2c706f4d0fd213a8541 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 21:43:50 2013 +0200 Include MSVCR90.DLL also. commit 2abd27c91c05e124815b77898133e60ec4de16c9 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 21:20:12 2013 +0200 Include Visual C++ runtime in the Windows package. commit 6e087731535bc938d48c0db09b7cc602c4769e8f Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 20:57:50 2013 +0200 README updates commit d7cadaa46fe5979518a7ee2493250434f4e8ee40 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 20:37:18 2013 +0200 Windows build fixes commit d344bda28ae7a1a590790e1346a73a5d159ce7dd Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 20:25:18 2013 +0200 Fix protoc plugin path commit 05e2dc20f32016be40b11cc3e02e1e62bbc3944f Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 20:24:32 2013 +0200 Actually no, it was a portability hassle commit c61660b3ea88c88834a764d08763b3a85514014d Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 20:09:30 2013 +0200 Makefile tuning commit 45c1a32e5046fe9323d4fd0213b474a554b2bbed Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 20:04:29 2013 +0200 Rework the Makefiles to be compatible with binary packages. commit ef31774cd902a6f069b8f2b80b870167328f5acb Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 19:20:04 2013 +0200 Moving files around Renamed READMEs to README.txt to be more friendly for Windows users. commit 480b39cc0adc749ad81183fad2bfce6548c56604 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 19:09:13 2013 +0200 Package as .zip, convert linebreaks commit ec517e2108f4e7cc31cffc4fdc2a11cebfabfc66 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 17:37:29 2013 +0200 Add build script for windows package commit 8c2dda67a100237bc6cdb3b814012079be2b3534 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 16:42:52 2013 +0200 Add descriptor.proto to repository to avoid messing with protoc include path. commit 58b3a22d6d66c485bfd7c571c528e4c6d3619cb2 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 15:46:41 2013 +0200 Add script for making linux binary package commit 356535da9bd79252e5365a6e5648b7fcd28b367c Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Nov 17 15:07:12 2013 +0200 Move the generator .proto files to a subdir, and get rid of precompiled versions. commit f4146edf01b8226709538a46919c666c37ebb50b Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 29 18:44:58 2013 +0200 Bring alltypes_pointer testcase up to date commit 8da15d8b802b55d04bdd84761e3c15f03b97a650 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 29 18:35:14 2013 +0200 Improve alltypes_pointer test case commit bc4ded3b4314e0fbd181b3cc01635052b56d2b19 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 29 18:34:57 2013 +0200 Fix missing error messages in pb_encode.c commit ef07635e3549b6a3ab6a6bafc12b7960ac6b1ab9 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Dec 9 19:25:19 2013 +0200 Rename encode_static_field -> encode_basic_field. commit 25516b059137be64735276bbe3a96029f4c926be Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Dec 9 19:19:12 2013 +0200 Organize allocation logic in generator, add pb_bytes_ptr_t. Allocation decision is now made before the field data type is decided. This way the data type decisions can more cleanly account for the allocation type, i.e. FT_DEFAULT logic etc. Added pb_bytes_ptr_t for pointer-allocated bytes-fields. There is no point generating separate structs for these, as they would all be of the same type. commit 414e637867c513ba9aa199e106c6d576e5b60287 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Dec 9 19:15:26 2013 +0200 Const-correctness and small cleanup. commit 4ae3b2e5661b154cd1f7e545f6052d271306ff25 Author: Martin Donath <scifish@gmail.com> Date: Sun Dec 8 23:25:32 2013 +0100 Generating and encoding messages with dynamic allocaiton commit 4f37c083d532a782e478b2cef6a02d028613564d Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Dec 22 23:24:02 2013 +0200 Negative int32 values take 10 bytes now. commit ed93db08dc19290ac3232abd1e7480c3d18c84a5 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Dec 21 18:08:04 2013 +0200 Fix problem with decode_legacy test case on Windows. commit cd9004089fd4ae42cc68fd15f085f42c48494cb4 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Dec 21 12:41:20 2013 +0200 Add test for extreme integer values (INT32_MAX etc.) in AllTypes. commit ee5b12c537115b113ce01708d4a86a4062cdb182 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Dec 21 12:16:03 2013 +0200 Add PB_LTYPE_UVARINT to fix encoding of negative int32 values. Apparently int32 values that are negative must be cast into int64 first before being encoded. Because uint32 still needs to be cast to uint64, the cases for int32 and uint32 had to be separated. Update issue 97 Status: FixedInGit commit 9cc19a5e998d93fbe6d7a7c18fba1e37a36076d5 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Dec 21 12:14:20 2013 +0200 Modify the alltypes test to check re-encoding through protoc. This way we can verify that the message is encoded exactly the same way as the official protobuf implementation would do it. commit eff9e11150c0bfb6baf5d6bec2351034b72d95ed Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Nov 14 17:56:42 2013 +0200 Optimize the common case of 1-byte reads for varints. For PB_BUFFER_ONLY configuration, this gives 20% speedup without increasing code size. commit 5813144246f8f132f90bea117e578477914be0ea Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Nov 13 22:10:42 2013 +0200 Make tests build in a separate folder, add to gitignore commit 171d64734a34674cd648ac7b8569b4b21285fed4 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Nov 11 09:22:32 2013 +0200 Fix path in FindNanopb.cmake. Update issue 94 Status: FixedInGit commit 321ca6c1d5736edf6ec2ac0b97eae58227954fad Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Nov 7 16:47:14 2013 +0200 Setting version to 0.2.5-dev commit 935a26ab1cd2982e2478ac6f9b8decf7deb5fe5b Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Nov 7 16:44:41 2013 +0200 Publishing nanopb-0.2.4 commit d7af99434a15a508dc909ba053115fb112b0a247 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Nov 2 22:19:26 2013 +0200 Add dates to changelog commit 564bdc84488ac03120b6c51a14d9d7c2ee93a58c Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Nov 2 22:11:27 2013 +0200 Update changelog commit dcdd7f98fdb000859a9e2812174a817431b1af34 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Nov 2 22:05:49 2013 +0200 Generate #define tags for extension fields also. Update issue 93 Status: FixedInGit commit 287207841db5df93cf7ff9c71a5f1548deb26b09 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Oct 29 16:32:47 2013 +0200 Remove the NANOPB_INTERNALS functions from public API. These have been deprecated since nanopb-0.1.6 (some since 0.1.3). Equivalent functions with better interface are available in the API. Update issue 91 Status: FixedInGit commit 0074deba9a2ff99c877abe1293f72a9ed76f46c1 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Oct 29 16:24:50 2013 +0200 Declare static functions before use. For compliance with MISRA C rules (issue 91). commit 4d69cc2f3ef33af9b63495e59127884d48d12fb3 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Oct 29 16:19:07 2013 +0200 Cleanup of comments. commit c7b4ce0293a3e5bc1857ec76cee246d505b154e4 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Oct 29 15:44:35 2013 +0200 Add a definition of the security model to the documentation. commit cd3af3272d170f4990ef745316faa7600571ef4e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Oct 29 15:32:51 2013 +0200 Rename some internal functions to have unique names commit ed564186e14c79c767096f4b306dc3c6c5bd2e7d Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Oct 24 21:45:39 2013 +0300 Detect invalid sizes when encoding bytes fields. commit 86d698315608c372868bb55f6d2c609600ac8e41 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Oct 24 09:52:40 2013 +0300 Same fix for EncodedSize.__mul__ commit 0848255d4a4b7fa032e962592b15c57b30cd8483 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Oct 24 08:44:59 2013 +0300 Handle also longs in EncodedSize commit 51f0e47295d537a113804f250cddef37a57237a8 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Oct 23 21:21:43 2013 +0300 Fix the size of length prefix for messages in other files. commit 49bd3f35a0b6db0fa47d2e6e8fe9ddfb1bbcd58b Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Oct 23 21:01:11 2013 +0300 Generate message size #defines also for messages defined in multiple files. Add testcase for the same. commit 2bfd497eea857d19a09054c5c54f3718b08dc8c9 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Oct 20 21:49:55 2013 +0300 Define pb_size_t and pb_ssize_t data types. Use these in pb_field_t definition to clean up some #ifs, and also to prepare for solving issue #82. commit e83fbd18d3fa33af8a57198cddefe5fcef1b2f58 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Oct 20 21:42:00 2013 +0300 Check array max size when encoding. Update issue 90 Status: FixedInGit commit 388d4de833cf4e2127b2ab0489cb6b14ecc0cbb5 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Sep 26 10:23:37 2013 +0300 Add #defines for the maximum encoded message size. Update issue 89 Status: FixedInGit commit 2363af29a238fb4fa17474c979a0f45cde617a9e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Sep 18 12:47:32 2013 +0300 Setting version to 0.2.4-dev commit 283a8f36cb1ad989765e0dda2071a2a15a12af10 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Sep 18 12:44:46 2013 +0300 Publishing nanopb-0.2.3 commit 8accc25710cdb0839649d7356caa8aae1212cb8b Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Sep 13 13:41:57 2013 +0300 Update changelog commit 73142ba082e56b8c5ba75c055a20c200b623da83 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Sep 13 13:35:25 2013 +0300 Add a new very simple example commit f47410ea4b8ae43e19facd378be4cf1073e1813b Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Sep 13 12:59:31 2013 +0300 Move examples into subfolders, add READMEs commit fd9a79a06db00c6199a5dcaee22ed2cd8e3c3e9b Merge: 59cba0b 9ada7e7 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Sep 13 11:31:45 2013 +0300 Merge branch 'dev_get_rid_of_ternary_operator' commit 9ada7e752516260054525fca8e1f67efa321f682 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Fri Sep 13 11:30:58 2013 +0300 Fine-tune the naming of new macros before merging into master. Requires re-generation of files generated with dev_get_rid_of_ternary_operator. commit 59cba0beeabac991b123dc6826e534f7838c5961 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Sep 11 17:33:50 2013 +0300 Expand extra_fields test to cover field skipping in case of streams. commit 152c2c910c9cda6e0beb1863c510c678300bdd7b Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Sep 11 16:51:53 2013 +0300 Disable warning about uint64_t (long long) commit 2b728150360f4c15512579ff53bc3247d3b8d083 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Sep 11 16:45:52 2013 +0300 Fix build error when path contains spaces commit 61ad04afd5236e2a6a0d4b4f2caa3bab4a820c99 Merge: 5b9ad17 9f93d39 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Sep 11 16:13:19 2013 +0300 Merge branch 'dev_tests_using_scons' commit 9f93d39f728c3e87b0ab482aa604c5cad4b1c86e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Sep 11 14:55:56 2013 +0300 Add tests for different compilation options commit d395768c8d3e63125c15950434fa255fb8c57717 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Sep 11 13:42:56 2013 +0300 Windows build fixes commit b9f14bddf778a5ed27e3289b90a0657fec3e1a53 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Sep 11 13:16:20 2013 +0300 Make all the tests ANSI C compatible. commit 840e213b9fa244bce4c67789971c02ce16e66295 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Sep 11 09:53:51 2013 +0300 Get rid of the ternary operator in the pb_field_t initialization. Some compilers where unable to detect that the ternary operator can be evaluated at the compile time. This commit does the evaluation on the Python side, which should fix the problem. The new .pb.c files are generated using PB_FIELD2() macro. The old PB_FIELD() macro remains, so that previously generated files keep working. commit e2e9980627810fe0ee2b8f119bcf651f0f318a8a Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Sep 10 22:34:54 2013 +0300 Move the rest of the tests to scons commit 0bbcb7b367998063637ee35c5d13716492cbf6a3 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Sep 10 20:54:29 2013 +0300 Compiler options for GCC, clang and tcc commit 696a01bf140e91661eae77663de99c78c95dcc73 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Sep 9 10:53:04 2013 +0300 Move the declarations of _pb_ostream_t and _pb_istream_t before first use. Otherwise Microsoft Visual C++ threats them as C++ classes instead of plain structs, forbidding use in C linkage functions. Thanks to Markus Schwarzenberg for the patch. Update issue 84 Status: Started commit f04ab838abd90fb70f7d6ef77fdacdf07f09ba4d Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Sep 10 17:44:32 2013 +0300 Build fixes for Windows/Visual C++ commit e681dd0d75a4b6a7974cc898477f3a138f7872c2 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Sep 10 12:39:39 2013 +0300 Add an example pb_syshdr.h file for platforms without C99. This allows building the tests easily on Visual C++ in C mode. Also add checks to pb.h that the defined integer types are of the proper sizes. This may prevent some difficult to debug problems later.. commit 4dccf28ba9c212b232147fd3823554d04b30c392 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Sep 10 11:34:57 2013 +0300 Convert more test cases to scons commit 5b9ad17dc2014d7506a7dde92281d8c36a1433e4 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Sep 9 10:53:04 2013 +0300 Move the declarations of _pb_ostream_t and _pb_istream_t before first use. Otherwise Microsoft Visual C++ threats them as C++ classes instead of plain structs, forbidding use in C linkage functions. Thanks to Markus Schwarzenberg for the patch. Update issue 84 Status: Started commit 4821e7f457ebd28aabcbdea726ebce11265f402f Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Sep 8 19:55:05 2013 +0300 Add support for running the nanopb generator as protoc plugin. Will be used to implement issue 47. For now, symlink nanopb_generator.py as protoc-gen-nanopb and use protoc --nanopb_out=. to call it. commit 262c62676cf740ec3ce14a22bde47b7968fec8f0 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Sep 8 17:52:03 2013 +0300 Start moving the tests into subfolders. Transition to SCons for build system for the tests. Only a few tests updated so far. Have to include all the rest before merging to mainline. Update issue 63 Status: Started commit d7f3a74388b4825d2c980c53d0a740ddfd0e4770 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Sep 8 11:05:20 2013 +0300 Handle unsupported extension field types more gracefully. Previously the generator would stop with NotImplementedException as soon as a required or repeated extension field is found. New behaviour is to just ignore the unsupported field and note that in a comment in the generated file. Furthermore, allow skipping of extension fields using the generator option (nanopb).type = FT_IGNORE. Update issue 83 Status: FixedInGit commit 4aef194a99705805153471c371e16a3633a4cc4e Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Aug 18 22:12:31 2013 +0300 Setting version to 0.2.3-dev commit 81cf30034b420cc6fbd769b172a13f7e57796b7b Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Aug 18 22:11:38 2013 +0300 Publishing nanopb-0.2.2 commit dd726985086f85734fc674a6aaa227cd9c23d1ef Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Aug 8 20:45:30 2013 +0300 Update changelog commit f15093e8bde18bb9fc6f56a7f6fff727eef74e6c Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Aug 8 20:37:59 2013 +0300 Document field extensions support Update issue 17 Status: FixedInGit commit b663909fb6e86f0ae0f450523e72fb7fbfb719ab Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Thu Aug 8 20:05:30 2013 +0300 Document PB_SYSTEM_HEADER commit ba40cacd3c4a60ccc9108d6acf7e813b1757dfd1 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Jul 22 19:00:04 2013 +0300 Finish the testcase for extensions commit 1f13e8cd2c5bb091677f35e53ae5757774e7d1ba Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Jul 22 18:59:15 2013 +0300 Fix bugs in extension support when multiple extension fields are present. commit 64947cb382271e2ab17dbf40ab634846d7d30ad9 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Jul 17 20:21:51 2013 +0300 Extension support implemented for decoder. Testing is still needed. Also only 'optional' extension fields are supported now, 'repeated' fields are not yet supported. commit 0343e2bcfe97748e8b1b93ecacb2e72fc0be7453 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Jul 17 19:29:06 2013 +0300 Add test case for extensions decoding commit ebddda9b5cdda5d082f07bbb6beb010f48c8f9b3 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Jul 17 19:23:19 2013 +0300 Implement extension support for the encoder commit 7c5e184c261bd5f5652993232f2125a6802004ab Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Wed Jul 17 00:06:54 2013 +0300 Implement generator support for extension fields (no encoder/decoder support yet) commit f064c2c48a43b0c1b011d52f53d519d809b8cee7 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Jul 16 11:31:38 2013 +0300 Fix formatting in documentation commit 3c10e6fa71cbee85c540c0702a5a95333cd3be32 Author: Kent Ryhorchuk <kryhorchuk@xeralux.com> Date: Mon Jul 15 18:04:47 2013 -0700 Check for empty message type before incrementing required_field_index. If you have a message that defined as empty, but attempt to decode a message that has one or more unknown fields then pb_decode fails. The method used to count the number of required fields counts 1 required field because the default type of PB_LAST_FIELD is PB_HTYPE_REQUIRED. commit a01856f4ab7f51f129dda7387acca8a63d039105 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Tue Jul 16 11:07:34 2013 +0300 Add test case for extra fields in AllTypes commit bb985e99274b537ee662d630b02664a3825d8829 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Jul 6 16:16:00 2013 +0300 Add pb_decode_delimited and pb_encode_delimited wrapper functions. Update issue 74 Status: FixedInGit commit 314460c2a518bdfc4e5dfb87992d907461a7c0e6 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Jul 6 15:55:15 2013 +0300 Clean up the comments in pb_encode.h and pb_decode.h commit 0ed3158560fe4b96d1d0df7f6b655409917f5989 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Jul 6 15:27:31 2013 +0300 Add section in pb.h for changing compilation settings. Update issue 76 Status: FixedInGit commit 4b705bf64b9a7b6bf0f61da3c84234847a7e8404 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Jul 6 15:25:42 2013 +0300 Add error message macros to API reference. commit 6e9e5329278b04a8e76d63f06fed2f3bfa80e2f8 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Jul 6 13:49:47 2013 +0300 Document the .options file usage. Also add note about the 'packed' message option being incompatible with CPUs that do not support unaligned access. Update issue 12 Status: FixedInGit Update issue 77 Status: FixedInGit commit 68dd0171bc51e871a522d21a40c35c08de0fb573 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sat Jul 6 13:01:21 2013 +0300 Switch the example project to use the new .options file commit a1cec46b3e824292b4ae22fa1f5c4faf9846196c Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Mon Jun 3 22:46:19 2013 +0300 Include the field tags in the generated .pb.h file. Patch from Michael Haberler. commit bfd7cb36b90dfa22d37c918d8cdcdce60bc8af85 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Apr 14 10:07:46 2013 +0300 Setting version to 0.2.2-dev commit ef741ea530e4086344ed0ad0fc90f21c224b9503 Author: Petteri Aimonen <jpa@git.mail.kapsi.fi> Date: Sun Apr 14 10:06:47 2013 +0300 Publishing nanopb-0.2.1 commit 26b52b79ad339c79aa1f0bbe09fcd1fce872b9b9 Author: Petteri Aimonen <jpa@git.mail.kapsi…
Using: 4.19.195-rtai-amd64 #5 SMP PREEMPT Error was: In function ‘process_inputs’: /home/git/linuxcnc-dev/src/emc/motion/control.c:531:9: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode for (int jNum = 0; jNum < NO_OF_KINS_JOINTS; jNum++) { ^~~ ... etc
====================================================================== Remove trailing whitespace in emc/motion/ and emc/tp/tp.c. ====================================================================== Reduce the scope of joint's and axes' private data so it isn't accessible from shared mem. ====================================================================== motmod refactoring: reduce scope of axis data. Move machine axis (not Axis the GUI) data and code into new file emc/motion/axis.c. Modify files that directly access axis data to use access functions instead. Reduces emcmot_axis_t and axis_hal_t types' visibility to only axis.c. Moves initialisation of data and creation of axis hal pins into axis.c. I've tried to make this patch a "move code around" (rather than "modify code") as much as possible, but some changes were necessary, e.g. regarding build dependencies and command.c's axis constraint checking. The idea has been to change as little as possible. NOTE: motion-logger build currently disabled for non-uspace builds due to me not knowing how to solve math build dependencies. See src/emc/motion-logger/Submakefile. ====================================================================== NOTE: control.c, axis.c for loops modified for use with available rtai debs See github notes for this commit: 3768a3c533 ====================================================================== NOTE: bin/motion-logger is uspace so src/emc/motion-logger/Submakefile not changed $ uname -a Linux dvm 4.19.195-rtai-amd64 #5 SMP PREEMPT Sun Jul 11 19:13:27 BST 2021 x86_64 GNU/Linux $ ldd bin/motion-logger linux-vdso.so.1 (0x00007ffd1fb92000) libnml.so.0 => /home/git/linuxcnc-dev/lib/libnml.so.0 (0x00007f1e25d0f000) liblinuxcnchal.so.0 => /home/git/linuxcnc-dev/lib/liblinuxcnchal.so.0 (0x00007f1e25cff000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1e25b54000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1e25993000) libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f1e2580f000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f1e257f5000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f1e257e9000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1e257c8000) /lib64/ld-linux-x86-64.so.2 (0x00007f1e25d7c000) $ grep loadusr ./tests/motion-logger/*/* ./tests/motion-logger/basic/mock-motion.hal:loadusr -W motion-logger out.motion-logger ./tests/motion-logger/mountaindew/mock-motion.hal:loadusr -W motion-logger out.motion-logger ./tests/motion-logger/startup-gcode-abort/mock-motion.hal:loadusr -W motion-logger out.motion-logger
====================================================================== Remove trailing whitespace in emc/motion/ and emc/tp/tp.c. ====================================================================== Reduce the scope of joint's and axes' private data so it isn't accessible from shared mem. ====================================================================== motmod refactoring: reduce scope of axis data. Move machine axis (not Axis the GUI) data and code into new file emc/motion/axis.c. Modify files that directly access axis data to use access functions instead. Reduces emcmot_axis_t and axis_hal_t types' visibility to only axis.c. Moves initialisation of data and creation of axis hal pins into axis.c. I've tried to make this patch a "move code around" (rather than "modify code") as much as possible, but some changes were necessary, e.g. regarding build dependencies and command.c's axis constraint checking. The idea has been to change as little as possible. NOTE: motion-logger build currently disabled for non-uspace builds due to me not knowing how to solve math build dependencies. See src/emc/motion-logger/Submakefile. ====================================================================== NOTE: control.c, axis.c for loops modified for use with available rtai debs See github notes for this commit: 3768a3c533 ====================================================================== NOTE: bin/motion-logger is uspace so src/emc/motion-logger/Submakefile not changed $ uname -a Linux dvm 4.19.195-rtai-amd64 #5 SMP PREEMPT Sun Jul 11 19:13:27 BST 2021 x86_64 GNU/Linux $ ldd bin/motion-logger linux-vdso.so.1 (0x00007ffd1fb92000) libnml.so.0 => /home/git/linuxcnc-dev/lib/libnml.so.0 (0x00007f1e25d0f000) liblinuxcnchal.so.0 => /home/git/linuxcnc-dev/lib/liblinuxcnchal.so.0 (0x00007f1e25cff000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1e25b54000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1e25993000) libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f1e2580f000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f1e257f5000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f1e257e9000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1e257c8000) /lib64/ld-linux-x86-64.so.2 (0x00007f1e25d7c000) $ grep loadusr ./tests/motion-logger/*/* ./tests/motion-logger/basic/mock-motion.hal:loadusr -W motion-logger out.motion-logger ./tests/motion-logger/mountaindew/mock-motion.hal:loadusr -W motion-logger out.motion-logger ./tests/motion-logger/startup-gcode-abort/mock-motion.hal:loadusr -W motion-logger out.motion-logger
Here's the hm2 watchdog change we talked about on IRC. It makes the hm2 hal write() function do the petting, and makes the pet_watchdog function just warn that it's going away.
Tested on Precise/RTAI with a 5i20.