Skip to content
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

kdb+ plugin uses unsafe C++ code #14

Open
FlyingOE opened this issue Aug 10, 2023 · 2 comments
Open

kdb+ plugin uses unsafe C++ code #14

FlyingOE opened this issue Aug 10, 2023 · 2 comments

Comments

@FlyingOE
Copy link

Assigning the result of str.c_str() to a pointer to be used later is against the C++ standard and is not safe. For example:

char* host = const_cast<char*>(hostStr.c_str());

FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Aug 16, 2023
- fixed memory leak upload qIPC call
- removed unsafe use of std::string::c_str()
- refactored kdb+ object parser
FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Aug 16, 2023
  - fixed memory leak upon initial qIPC call
  - removed unsafe use of std::string::c_str()
  - refactored kdb+ object parser
@FlyingOE
Copy link
Author

There is also potential memory leak upon initial qIPC call in kdb::loadTable:

K res = k(handle_, arg,(K)0);

K loadRes = k(handle_, loadArg,(K)0);

FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Aug 17, 2023
  - detect potential problems with variadic function calls
  - avoided potential memory leak
@FlyingOE
Copy link
Author

This is not exception-safe:

Connection* cup = new Connection(hostStr, port, usrStr);

FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Sep 1, 2023
…data structures; add support for nested (2-dimensional) column types.

WIP: remove legacy copy-and-paste code fragments; further streamline parsing of kdb+ data files.
FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Sep 14, 2023
FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Sep 18, 2023
FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Sep 18, 2023
FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Sep 18, 2023
FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Sep 18, 2023
FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Sep 18, 2023
 - kdbConnectionOnClose cannot throw
 - kdb+ data trailer detection
FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Sep 19, 2023
FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Sep 19, 2023
FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Sep 19, 2023
FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Oct 23, 2023
…data structures; add support for nested (2-dimensional) column types.

WIP: remove legacy copy-and-paste code fragments; further streamline parsing of kdb+ data files.
FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Oct 23, 2023
FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Oct 23, 2023
FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Oct 23, 2023
FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Oct 23, 2023
FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Oct 23, 2023
FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Oct 23, 2023
 - kdbConnectionOnClose cannot throw
 - kdb+ data trailer detection
FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Oct 23, 2023
FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Oct 23, 2023
FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Oct 23, 2023
FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Oct 23, 2023
FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Oct 23, 2023
FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Oct 23, 2023
FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Oct 23, 2023
FlyingOE pushed a commit to FlyingOE/DolphinDBPlugin that referenced this issue Oct 24, 2023
peeyee added a commit that referenced this issue Jun 24, 2024
#14 Major refactoring of kdb+ plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant