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

string_intrinsic (Subprocess aborted) failed #744

Closed
Pranavchiku opened this issue Nov 2, 2023 · 7 comments · Fixed by #773
Closed

string_intrinsic (Subprocess aborted) failed #744

Pranavchiku opened this issue Nov 2, 2023 · 7 comments · Fixed by #773
Labels
bug Something isn't working

Comments

@Pranavchiku
Copy link

Description

After building when I run tests using cmake --build build --target test

% cmake --build build --target test
.....
99% tests passed, 1 tests failed out of 286

Label Time Summary:
quadruple_precision    =   0.13 sec*proc (2 tests)

Total Test time (real) =   3.13 sec

The following tests did not run:
	  1 - always_skip (Skipped)
	101 - check4 (Skipped)

The following tests FAILED:
	 45 - string_intrinsic (Subprocess aborted)
Errors while running CTest
Output from these tests are in: /Users/pranavchiku/repos/stdlib-fortran-lang/build/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.
make: *** [test] Error 8

Expected Behaviour

Tests shall pass.

Version of stdlib

b8fbb3c

Platform and Architecture

MacOS

Additional Information

No response

@Pranavchiku Pranavchiku added the bug Something isn't working label Nov 2, 2023
@jvdp1
Copy link
Member

jvdp1 commented Nov 2, 2023

Thank you for reporting this issue. could you rerun the tests with "--rerun failed --output-on-failure" to get more information on which tests are actually failing, please?

@jvdp1
Copy link
Member

jvdp1 commented Nov 2, 2023

Could your issue be related with the PR #736 ?

@wpbonelli
Copy link

I see the same on macOS 13.6.1, aarch64-apple-darwin22.3.0, GCC 13.2.0. It is indeed the move test that fails, in particular move to self:

call move(from_string, from_string)

@jvdp1
Copy link
Member

jvdp1 commented Nov 4, 2023

Thank you @wpbonelli for testing. This issue should have been solved with #736 . Question: is it an issue with the compiler or with the code?
As I don't have a macOS, could you investigate what the problem is, please?

@wpbonelli
Copy link

wpbonelli commented Nov 4, 2023

It may be related to apple silicon — @Pranavchiku has not reported arch but presumably CI would fail here if it was universal on mac. I will investigate.

edit: confirmed the test passes on an Intel Mac with gcc 13.2

@wpbonelli
Copy link

wpbonelli commented Nov 6, 2023

At this point it seems like a compiler problem. The issue does not reproduce in a minimal test https://github.com/wpbonelli/move-test on arm64. My next step is to add a test-drive harness and see if it still succeeds.

I guess I will try to systematically bring the test project to equivalence with stdlib_string_type.f90 to track it down

@certik
Copy link
Member

certik commented Feb 27, 2024

On Apple M1 Max with GFortran 11.3.0 I get:

$ ./test/string/test_string_intrinsic 
# Testing: string-intrinsic
  Starting lgt ... (1/17)
       ... lgt [PASSED]
  Starting llt ... (2/17)
       ... llt [PASSED]
  Starting lge ... (3/17)
       ... lge [PASSED]
  Starting lle ... (4/17)
       ... lle [PASSED]
  Starting trim ... (5/17)
       ... trim [PASSED]
  Starting len ... (6/17)
       ... len [PASSED]
  Starting len_trim ... (7/17)
       ... len_trim [PASSED]
  Starting adjustl ... (8/17)
       ... adjustl [PASSED]
  Starting adjustr ... (9/17)
       ... adjustr [PASSED]
  Starting scan ... (10/17)
       ... scan [PASSED]
  Starting verify ... (11/17)
       ... verify [PASSED]
  Starting repeat ... (12/17)
       ... repeat [PASSED]
  Starting index ... (13/17)
       ... index [PASSED]
  Starting char ... (14/17)
       ... char [PASSED]
  Starting ichar ... (15/17)
       ... ichar [PASSED]
  Starting iachar ... (16/17)
       ... iachar [PASSED]
  Starting move ... (17/17)
test_string_intrinsic(96879,0x102dd8580) malloc: *** error for object 0x6000006982c0: pointer being freed was not allocated
test_string_intrinsic(96879,0x102dd8580) malloc: *** set a breakpoint in malloc_error_break to debug

Program received signal SIGABRT: Process abort signal.

Backtrace for this error:
#0  0x102fe7c07
#1  0x102fe6cc3
#2  0x18f3244e3
#3  0x18f30ceaf
#4  0x18f24a313
#5  0x18f12fa1b
#6  0x18f13305f
#7  0x18f121fa7
#8  0x102be684f
#9  0x102bf19bb
#10  0x102bf7cc3
#11  0x102be8a4b
#12  0x102bf9e0f
zsh: abort      ./test/string/test_string_intrinsic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants