| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Many stringop-truncation and stringop-overflow warnings are still
there (so many).
https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8/
Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
|
|
|
|
|
| |
Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
|
|
|
|
|
| |
Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
|
|
|
|
|
|
|
|
|
| |
Current dlt_file_read_header() function which is used for e.g.
dlt-convert, dlt-sortbytimestamp, etc. stops finding DLT header if it's
not available in the next file position. It is improved to read the
header in a loop until it's found.
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
| |
Signed-off-by: Felix Herrmann <external.Felix.Herrmann3@de.bosch.com>
Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
|
|
|
|
| |
This reverts commit e420ee62d89d5efab6ad7275910cb3eec8497da6.
|
|
|
|
|
|
| |
The log message was printed as a signed value for uint64 type. This
commit fixes to print as an unsigned value.
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
| |
A DLT lib user can create a message large enough that
dlt_user.resend_buffer is not large enough, and thus it will overflow
Signed-off-by: Ricardo Leite <rleite@dcc.fc.up.pt>
|
|
|
|
|
|
|
| |
Check for file == null before accessing the pointer
for a debug message
Signed-off-by: Sebastian Kloska <sebastian.kloska@snafu.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Symptome: If access to the trace directory is not
granted by AppArmor access(...) still reports otherwise.
dlt_offline_trace_get_total_size(...)
tries to open the dir via opendir(...) and tries a
readdir without any further check, which results in an
SEGFAULT
* Solution: (1) Make dlt_offline_trace_get_total_size return
ssize_t instead of unsigned long, which gives us a
chance to return an error state (2) Check the return value
from opendir(...) and bail out on error. Use this to return
DLT_RETURN_ERROR in dlt_offline_trace_check_size.
* ToDo: (1) Error state is not yet checked and reported
back. On Error we just don't generate any offline
log files without any further complain. (2) Find a replacement
for access(...) which reports properly under AppArmor.
(3) Report the confusing behaviour of access(...) to the
AppArmor team.
Signed-off-by: Sebastian Kloska <seebastian.kloska@snafu.de>
|
|
|
| |
Signed-off-by: Sebastian Lipponer <mail@sebastianlipponer.de>
|
|
|
|
|
|
|
|
|
| |
The use of this macro in a if condition is actually non-standard C++
code. GCC issues a warning that ISO C++ forbids braced-groups within
expressions when compiled with -Wpedantic. Other compilers fail with an
error. Change the macro to an internal function in order to improve the
portability to other platforms (i.e. MSVC, proprietary embedded).
Signed-off-by: Sebastian Lipponer <mail@sebastianlipponer.de>
|
|
|
|
|
|
|
|
| |
Fix the issue that DLT offline trace creating mutiple files
even after reaching MaxTrace size when filename is index based.
Related to: https://github.com/GENIVI/dlt-daemon/pull/174
Signed-off-by: Vo Trung Chi <chi.votrung@vn.bosch.com>
|
|
|
|
|
|
|
|
|
| |
* Avoided Seg fault in dlt_message_payload (#179)
Avoided Seg fault by adding boundary check before buffer access.
Signed-off-by: Ravi Sankar P <ponnurangamravi.sankar@in.bosch.com>
Signed-off-by: Vo Trung Chi <chi.votrung@vn.bosch.com>
|
|
|
|
|
|
|
| |
The function dlt_offline_trace_file_name() use sizeof the
pointer as the maximum file name size, so it cannot create
the file name as expected.
Signed-off-by: Vo Trung Chi <chi.votrung@vn.bosch.com>
|
|
|
|
|
|
|
| |
This commit is fixed the memory leak in case the dlt application do
reattach to the daemon.
Signed-off-by: Vo Trung Chi <chi.votrung@vn.bosch.com>
|
|
|
|
|
|
| |
Since localtime() was calling tzset() internally, it should be used
before localtime_r(). Refer to man page of localtime_r() for detail.
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
| |
This commit includes improvement of related code.
Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
|
|
|
|
| |
Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
|
|
|
|
|
|
|
|
|
|
| |
With this commit, following DLT user service IDs are now free to use:
- 0xF0A
- 0xF0F to 0xFFE
Also the cases in dlt_daemon_client_process_control() is reordered so
that it matches the order of dlt_user_services enum.
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
| |
Replace all Linux specific shared memory APIs with POSIX alternatives.
Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dlt_offline_logstorage.c
- Parameter to isdigit is not correct
- Handle the size of memset() and strncpy() properly
dlt-test-stress-user.c
- Parameter d is duplicated
dlt_env_ll.c
- Parameter env is used before NULL check
- Remove redundant line
dlt-control-common.c
dlt_daemon_event_handler.c
- Do not use NULL variable to print log
dlt_config_file_parser.c
- Remove unnecessary loop
dlt_daemon_client.c
- Return error in NULL check
dlt_user.c
- Free allocated memory in error case
Related commit: 5c8f88d logstorage: fix compile error
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
| |
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
| |
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
| |
use default config path relative to CONFIGURATION_FILES_DIR
Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
|
|
|
|
|
|
|
|
| |
DLT limits the path length and does not do anything else to determine
the actual value, because the least that is supported on any system
that DLT runs on is 1024 bytes.
Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
clang warns that
warning: size argument in 'strncat' call appears to be size of the
source [-Wstrncat-size]
strncat(log_file_name, file_index, sizeof(file_index));
^~~~~~~~~~~~~~~~~~
do as the
https://github.com/llvm-mirror/clang/blob/05be53c9524408516651d5678d55d0d4a5d3a894/test/Sema/warn-strncat-size.c#L30
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
use (void)xyz instead of self assign
error log:
error: explicitly assigning value of variable of type 'void *' to
itself
[-Werror,-Wself-assign]
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
|
|
|
|
|
|
|
| |
There were a couple of places which used snprintf-dlt_log. It is
now replaced with dlt_vlog().
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
| |
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When it fails to send a log message to connected client, daemon
tries to store the remaining partial message to internal ring
buffer and send again later. When calculating the number of bytes
which were sent to client, it had a bug which it keeps on
incrementing instead of initializing the variable on every message,
which never reached to the condition mentioned above and had a
possibility to overflow and access invalid memory. On the other hand,
daemon doesn't need to store the unsent partial message, as the socket
to the client will be closed on failure and the sent partial message
will be dropped anyways.
This commit removes the lines where the daemon tries to store the
partial message to ring buffer. With this, variable bytes_sent is
now removed.
Related commit: 2262f8b Made socket send reliable
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
|
| |
strtol converts extra data in the array, so it leads to data crash.
It is now fixed to fill the last byte of the array with null
character once data copy complete and before convert.
Signed-off-by: Ravi Sankar P <ponnurangamravi.sankar@in.bosch.com>
|
|
|
|
| |
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
|
|
|
|
| |
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
|
|
|
|
|
|
|
| |
Error handling was added in case it failed to send to daemon.
Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
|
| |
Made TCP socket send reliable by storing the unsent/partial message
in the ring buffer. This will avoid the corrupted messages/Gaps in
Viewer side
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
|
|
|
|
| |
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
| |
Add more logs to places where any pointer of buffer may get modified,
to get more information when we get unexpected behaviour
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
| |
Signed-off-by: Manikandan C <mchockalingam@de.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is possible to change the default buffer size for log message creation via
environment variable:
export DLT_LOG_MSG_BUF_LEN=<value>
Instead of using a static buffer with size of 1390 bytes, the buffer is
allocated dynamically with the specified value.The max size is restricted to approx 65k.
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The poll system call is now used in the daemon to enable DLT use in
POSIX compliant systems. Also added introduced new unregister_app macro
to avoid missing of logs in startup buffer.
Signed-off-by: Frederic Berat <fberat@de.adit-jv.com>
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
| |
- dlt-control couldn't receive all the GET_LOG_INFO response message
when many applications and contexts are registered.
Therefore the receiver buffer size was extended to 65K.
Also the receive buffer size macros are reduced to one variable.
- Code cleanup and improvements
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
| |
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Support to send and parse periodic control messages
-add application/contexts to passive ECU list
-Refactor dlt_gateway_send_control_message
-Gateway issues with corrupted data and on demand connection
-Unit Test update
Signed-off-by: Saya Sugiura ssugiura@jp.adit-jv.com
Signed-off-by: Christoph Lipka clipka@jp.adit-jv.com
Signed-off-by: S. Hameed shameed@jp.adit-jv.com
Signed-off-by: ManikandanC Manikandan.Chockalingam@in.bosch.com
|
|
|
|
|
|
|
|
|
|
| |
- improvements and refactor key creation
- Sync strategies added
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
Signed-off-by: Ravi Sankar P <ponnurangamravi.sankar@in.bosch.com>
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
|
| |
|
|
|
|
|
|
|
|
| |
file parser: Replace hash functions with list
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
|
|
| |
* IPC: Unix socket added
The user can select either FIFO or UNIX socket as IPC between user library and daemon through CMakelist option.
Socket path configurable for both FIFO and Unix Socket now configurable in CMake
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix -Wpointer-compare of compare with null char
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
* dlt_common: fix -Wformat-truncation of snprintf
Avoid snprintf output truncation by handling return value
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
* dlt_offline_trace: Fix Wformat-truncation of snprintf
Compile with Gcc 7.x has the warning of snprintf buffer length size.
Check return value of snprintf() for avoiding the warning.
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
* dlt_common_test: Fix memleak t_dlt_message_read
some resources were not free after using.
Detected by running
valgrind --leak-check=full ./gtest_dlt_common
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
|
|
|
|
|
|
| |
Post enabling and updating “OfflineTraceDirectory” variable default path in dlt.conf file, dlt-daemon resulted in crash with Segmentation fault(SIGSEGV) due to Invalid OfflineTraceDirectory path.
dlt_offline_trace-patch-1 contains an update which verifies “existence of offline trace directory” and its “accessibility issues”. It returns -1 on failure conditions and indicates user with appropriate information instead resulting in APPCRASH.
|