lpython icon indicating copy to clipboard operation
lpython copied to clipboard

Fix logical comparsion for string

Open hankluo6 opened this issue 9 months ago • 1 comments

Fixes #2615

The problem is that _lpython_str_compare_eq requires pointer to pointer to char as parameters. However, the previous implementation passed a null pointer, leading to a segmentation fault.

hankluo6 avatar May 13 '24 02:05 hankluo6

Thanks for this @hankluo6! The PR looks good! :+1:

kmr-srbh avatar May 14 '24 14:05 kmr-srbh

Thank you @anutosh491! I raised an issue #2708 for this.

hankluo6 avatar May 17 '24 03:05 hankluo6

Could you maybe add a TODO here saying that we can add the C backend once the above issue you raised has been fixed ? https://github.com/lcompilers/lpython/blob/fbbdbdd83e866a4ebbb7a5541bd7989be60c5fe1/integration_tests/CMakeLists.txt#L768-L769

I guess that would be sufficient enough to merge this !

anutosh491 avatar May 17 '24 05:05 anutosh491