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

[BUG]: Possible errors in initializing assignment structures #1700

Closed
yzewei opened this issue Feb 19, 2024 · 5 comments
Closed

[BUG]: Possible errors in initializing assignment structures #1700

yzewei opened this issue Feb 19, 2024 · 5 comments
Labels
kind/bug Something isn't working
Milestone

Comments

@yzewei
Copy link
Contributor

yzewei commented Feb 19, 2024

Describe the bug

Problems discovered during the compilation of drivers_test
https://github.com/falcosecurity/libs/tree/master/test/drivers

[ 19%] Building CXX object test/drivers/CMakeFiles/drivers_test.dir/test_suites/syscall_exit_suite/recvmsg_x.cpp.o
/home/yzw/pr/libs/test/drivers/test_suites/syscall_exit_suite/recvmsg_x.cpp: In member function ‘virtual void SyscallExit_recvmsg_ancillary_data_Test::TestBody()’:
/home/yzw/pr/libs/test/drivers/test_suites/syscall_exit_suite/recvmsg_x.cpp:579:3: error: no match for ‘operator=’ (operand types are ‘msghdr’ and ‘<brace-enclosed initializer list>’)
   };
   ^
cmake -DUSE_BUNDLED_DEPS=On -DENABLE_DRIVERS_TESTS=On -DBUILD_LIBSCAP_GVISOR=Off  -DCREATE_TEST_TARGETS=On ..
make drivers_test

How to reproduce

libs/test/drivers/test_suites/syscall_exit_suite/recvmsg_x.cpp :579

                msg.msg_iov = &iov;
                msg.msg_iovlen = 1;
                msg.msg_control = cmsg_buf;
                msg.msg_controllen = sizeof(cmsg_buf);

                msg_controllen = msg.msg_controllen;
@yzewei yzewei added the kind/bug Something isn't working label Feb 19, 2024
@Andreagit97
Copy link
Member

I cannot reproduce it...can you provide a simple fix? Something like:

		msg.msg_iov = &iov,
		msg.msg_iovlen = 1,
		msg.msg_control = cmsg_buf,
		msg.msg_controllen = sizeof(cmsg_buf)

@Andreagit97 Andreagit97 added this to the 0.15.0 milestone Feb 26, 2024
@yzewei
Copy link
Contributor Author

yzewei commented Feb 27, 2024

                msg.msg_iov = &iov;
                msg.msg_iovlen = 1;
                msg.msg_control = cmsg_buf;
                msg.msg_controllen = sizeof(cmsg_buf);

                msg_controllen = msg.msg_controllen;

@yzewei
Copy link
Contributor Author

yzewei commented Feb 27, 2024

I cannot reproduce it...can you provide a simple fix? Something like:

		msg.msg_iov = &iov,
		msg.msg_iovlen = 1,
		msg.msg_control = cmsg_buf,
		msg.msg_controllen = sizeof(cmsg_buf)

like this? #1700 (comment)

@Andreagit97
Copy link
Member

yes!

@Andreagit97 Andreagit97 modified the milestones: 0.15.0, 0.16.0 Mar 11, 2024
@FedeDP
Copy link
Contributor

FedeDP commented Apr 16, 2024

I think this should have been fixed by: 83f1529 (part of #1731)

@yzewei yzewei closed this as completed Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants