titan.core issueshttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues2023-12-15T12:29:14Zhttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/709Isvalue function causes segmentation fault2023-12-15T12:29:14ZAdam KnappIsvalue function causes segmentation faultSee: https://www.eclipse.org/forums/index.php/t/1114083/See: https://www.eclipse.org/forums/index.php/t/1114083/Adam KnappAdam Knapphttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/720PER_ALIGNED is used incorrectly2024-03-19T07:23:14ZCsaba RádulyPER_ALIGNED is used incorrectly## Summary
PER_ALIGNED is used incorrectly in several places
## Steps and/or TTCN-3 code to reproduce
In several places, the expression `(p_options && PER_ALIGNED)` is used. Using logical `&&` with a constant operand is incorrect.
The...## Summary
PER_ALIGNED is used incorrectly in several places
## Steps and/or TTCN-3 code to reproduce
In several places, the expression `(p_options && PER_ALIGNED)` is used. Using logical `&&` with a constant operand is incorrect.
The value of `PER_ALIGNED` is `0x01`, so this expression is true if `p_options` is not zero.
Bitwise `&` was likely intended.
## What is the current bug behavior?
Aligned PER encoding will be used when canonical PER is requested.
## What is the expected correct behavior?
Aligned PER encoding not used when only canonical PER is requested.
## Relevant logs and/or screenshots
-
## Possible fixes
Change `(p_options && PER_ALIGNED)` to `(p_options & PER_ALIGNED)`
```
core/Bitstring.cc:1432
core/Bitstring.cc:1484
core/Charstring.cc:1980
core/Charstring.cc:2333
core/Octetstring.cc:1549
core/Octetstring.cc:1594
core/Universal_charstring.cc:3297
core/Universal_charstring.cc:3371
```
## Titan version
Commit 129c715f0
## Platform details (OS type and version)
Any
/cc @aknappqwt @mmagyariAdam KnappAdam Knapphttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/717Configurable lib folder for OpenSSL to handle OpenSSL32024-03-19T07:23:19ZAdam KnappConfigurable lib folder for OpenSSL to handle OpenSSL3Depending on the install configuration, OpenSSL3 might use `lib64` folder instead of `lib`. In our Makefiles, `lib` is used. The proposed solution is to introduce a new variable `OPENSSL_LIB_DIR` that can be overwritten in the `Makefile....Depending on the install configuration, OpenSSL3 might use `lib64` folder instead of `lib`. In our Makefiles, `lib` is used. The proposed solution is to introduce a new variable `OPENSSL_LIB_DIR` that can be overwritten in the `Makefile.personal` on demand.Adam KnappAdam Knapphttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/710warning: ‘ext_bit’ may be used uninitialized in this function2024-01-23T13:59:30ZGábor Szalaiwarning: ‘ext_bit’ may be used uninitialized in this function## Summary
The PER encoder of the extended enumeration causes c++ warning like:
```
CAP_datatypes_CAPv4.cc: In member function ‘void CAP__datatypes__CAPv4::EventTypeBCSM::PER_encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int) cons...## Summary
The PER encoder of the extended enumeration causes c++ warning like:
```
CAP_datatypes_CAPv4.cc: In member function ‘void CAP__datatypes__CAPv4::EventTypeBCSM::PER_encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int) const’:
CAP_datatypes_CAPv4.cc:22640:18: warning: ‘ext_bit’ may be used uninitialized in this function [-Wmaybe-uninitialized]
22640 | p_buf.PER_put_bit(ext_bit);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~
```
## Steps and/or TTCN-3 code to reproduce
Example ASN.1 enum:
```
EventTypeBCSM ::= ENUMERATED {
collectedInfo (2),
analyzedInformation (3),
routeSelectFailure (4),
oCalledPartyBusy (5),
oNoAnswer (6),
oAnswer (7),
oMidCall (8),
oDisconnect (9),
oAbandon (10),
termAttemptAuthorized (12),
tBusy (13),
tNoAnswer (14),
tAnswer (15),
tMidCall (16),
tDisconnect (17),
tAbandon (18),
oTermSeized (19),
callAccepted (27),
oChangeOfPosition (50),
tChangeOfPosition (51),
...,
oServiceChange (52),
tServiceChange (53)
}
```
## What is the current bug behavior?
```
CAP_datatypes_CAPv4.cc: In member function ‘void CAP__datatypes__CAPv4::EventTypeBCSM::PER_encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int) const’:
CAP_datatypes_CAPv4.cc:22640:18: warning: ‘ext_bit’ may be used uninitialized in this function [-Wmaybe-uninitialized]
22640 | p_buf.PER_put_bit(ext_bit);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~
```
In ext_bit is not initialized if the value is unbound. It doesn't cause run time problem, just compile time warning.
## What is the expected correct behavior?
no warning.
## Possible fixes
Initialize the ext_bit when declared.
## Titan version
10.0.0 & git head
/cc @aknappqwt @mmagyariGábor SzalaiGábor Szalai