misbehaving system halting work
The work i landed on for a while was software called 'brainflow'. I am actually part of the organisation now. I am presently stuck on https://github.com/brainflow-dev/brainflow/pull/247 and don't really know what to do. My system apparently has corruption, but it is pretty complicated for me to resolve that, so I am just debugging things on the corrupt system.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 hello Karl! i haven't had time to dig into this much, but one thing stuck out to me in how you're using the FTDI content and functions. here you initialize the ftdi_content, but are using a local structure variable: https://github.com/xloem/brainflow/blob/ecd1049f3a4146bd24a0b21f50b5267eb1d6... once you return from LibFTDISerial::is_libftdi () function, the ftdi_context will be destroyed. you'll notice that this context must live as long as the process, otherwise references to it will become invalid, leading to stack / heap corruption. for example, this usage calls from main(), where the ftdi_context will exist as long as the program is running: https://github.com/punyal/Contiki_3-IPsec/blob/93130cd1123f362594e915283dbf7... you could solve this by declaring a static (global) ftdi_context, however, this entails locking / concurrency concerns. i hope this helps. perhaps later this weekend i dig in depth into your problems. best regards, -----BEGIN PGP SIGNATURE----- iNUEAREKAH0WIQRBwSuMMH1+IZiqV4FlqEfnwrk4DAUCYDksRF8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0NDFD MTJCOEMzMDdEN0UyMTk4QUE1NzgxNjVBODQ3RTdDMkI5MzgwQwAKCRBlqEfnwrk4 DJSNAP4/21OaXu96TS2w7kZGQhurSOQilGQ+ZA4g6TllSIKUVgEAzbeQ7/hmf3Nw eZfqr5al/5d5LZF3bFcfKqJ1E1fmh8s= =EkrV -----END PGP SIGNATURE-----
Hey coderman, The structure you link to is local to only that static function. It doesn't share the reference outside the function, to lead to the corruption you express concern around. The class also has a member variable for use in a more ongoing way. Maybe it would be good to use an instance of the class in that static function to be more organised, though, or something. I mentioned the issue on the chat and got a couple recommendations for antivirus software. I'm thinking if I could use an android emulator to bundle the issue up so it reproduces, I'm thinking it might help for giving something to an antivirus vendor. I'm not sure. Sometimes I struggle to continue with projects and there are extensive delays (a number of years now for my volk pull request). This looks likely to be one of those times; we'll find out. On Fri, Feb 26, 2021, 12:14 PM coderman <coderman@protonmail.com> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
hello Karl!
i haven't had time to dig into this much, but one thing stuck out to me in how you're using the FTDI content and functions.
here you initialize the ftdi_content, but are using a local structure variable:
https://github.com/xloem/brainflow/blob/ecd1049f3a4146bd24a0b21f50b5267eb1d6...
once you return from LibFTDISerial::is_libftdi () function, the ftdi_context will be destroyed.
you'll notice that this context must live as long as the process, otherwise references to it will become invalid, leading to stack / heap corruption.
for example, this usage calls from main(), where the ftdi_context will exist as long as the program is running:
https://github.com/punyal/Contiki_3-IPsec/blob/93130cd1123f362594e915283dbf7...
you could solve this by declaring a static (global) ftdi_context, however, this entails locking / concurrency concerns.
i hope this helps. perhaps later this weekend i dig in depth into your problems.
best regards,
-----BEGIN PGP SIGNATURE-----
iNUEAREKAH0WIQRBwSuMMH1+IZiqV4FlqEfnwrk4DAUCYDksRF8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0NDFD MTJCOEMzMDdEN0UyMTk4QUE1NzgxNjVBODQ3RTdDMkI5MzgwQwAKCRBlqEfnwrk4 DJSNAP4/21OaXu96TS2w7kZGQhurSOQilGQ+ZA4g6TllSIKUVgEAzbeQ7/hmf3Nw eZfqr5al/5d5LZF3bFcfKqJ1E1fmh8s= =EkrV -----END PGP SIGNATURE-----
On Fri, Feb 26, 2021, 12:14 PM coderman <coderman@protonmail.com> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
hello Karl!
i haven't had time to dig into this much, but one thing stuck out to me in how you're using the FTDI content and functions.
here you initialize the ftdi_content, but are using a local structure variable:
https://github.com/xloem/brainflow/blob/ecd1049f3a4146bd24a0b21f50b5267eb1d6...
At https://github.com/xloem/brainflow/blob/ecd1049f3a4146bd24a0b21f50b5267eb1d6... I pass a pointer to the stack to a function that will deallocate from the heap. Maybe I fix that and reboot my system, it will be enough voodoo.
once you return from LibFTDISerial::is_libftdi () function, the ftdi_context will be destroyed.
you'll notice that this context must live as long as the process, otherwise references to it will become invalid, leading to stack / heap corruption.
for example, this usage calls from main(), where the ftdi_context will exist as long as the program is running:
https://github.com/punyal/Contiki_3-IPsec/blob/93130cd1123f362594e915283dbf7...
you could solve this by declaring a static (global) ftdi_context, however, this entails locking / concurrency concerns.
i hope this helps. perhaps later this weekend i dig in depth into your problems.
best regards,
-----BEGIN PGP SIGNATURE-----
iNUEAREKAH0WIQRBwSuMMH1+IZiqV4FlqEfnwrk4DAUCYDksRF8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0NDFD MTJCOEMzMDdEN0UyMTk4QUE1NzgxNjVBODQ3RTdDMkI5MzgwQwAKCRBlqEfnwrk4 DJSNAP4/21OaXu96TS2w7kZGQhurSOQilGQ+ZA4g6TllSIKUVgEAzbeQ7/hmf3Nw eZfqr5al/5d5LZF3bFcfKqJ1E1fmh8s= =EkrV -----END PGP SIGNATURE-----
here you initialize the ftdi_content, but are using a local structure variable:
https://github.com/xloem/brainflow/blob/ecd1049f3a4146bd24a0b21f50b5267eb1d6...
At https://github.com/xloem/brainflow/blob/ecd1049f3a4146bd24a0b21f50b5267eb1d6... I pass a pointer to the stack to a function that will deallocate from the heap. Maybe I fix that and reboot my system, it will be enough voodoo.
Fixing that small issue interacts with github's limitations such that I will be opening a new pull request to continue the work (because I force-pushed the fix; they don't let me reopen closed pull reuqests with force-pushed changes). This removes the mention of trojan networks from the pull request history.
[spam] sorry for clogging list with my psychosis more currently i am actually believing that my psychosis is caused by system compromise! i'm sure i'll get over this.
I am working around this strange behavior on my system (certain combinations of arguments to grep in pipelines were absorbing all output) by disabling buffering midway in the pipelines. That works for me. [spam] [log]
participants (2)
-
coderman
-
Karl