Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8510809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:48:25+00:00 2026-06-11T03:48:25+00:00

Based on some limitations with the NDK standalone toolchain and bionic, I have rolled

  • 0

Based on some limitations with the NDK standalone toolchain and bionic, I have rolled my own toolchain using crosstool-NG with these general settings:

  • binutils-2.22
  • gcc-4.5.3 with gfortran enabled
  • glibc-2.14.1
  • kernel-headers-2.35.7
  • arch arm4t

Using this I build an executable and upload all dependencies, including libc, ld-linux etc with it onto my Android device. I manually run the executable with ld-linux.so.3 –library-path …

It is a very complex executable, and it all seems to work except, if I do any system() call, even something basic, like system(“pwd”) or system(NULL) I get 127 as the status (not found). If I go further and use popen instead to collect a response, I get:

*glibc detected * double free or corruption

What is going on? Has anyone succeeded at doing similar? Is there a permissions issue? Is there something fundamentally different about Android that makes system() calls not possible? Where can I find out how bionic handles system and popen (source code) in the end, because I think if you use the NDK you can do system() calls.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T03:48:26+00:00Added an answer on June 11, 2026 at 3:48 am

    (1) SHELL environment variable is unlikely to be set on Android. The default shell /bin/sh doesn’t exist (AFAIK); it’s in /system/bin/sh. This is likely what causes system to fail.

    (2) You can find the implementations on GitHub: system, popen. Your crash in glibc sounds like a library bug to me (unless you’re using popen from a signal handler or in a multithreaded environment)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Person Class and based on some help I received in this
I have the following requirement: Based on some user input, I need to generate
I want to toggle a class based on some condition which I have to
I have a library I am creating based on some WSDL/XSD definitions. I am
I am looking for a dedicated server because shared webhosting solutions have some limitations.
I have to color Calc rows, based on some string condition. So each time
Based on some answers to this question it appears that +alloc does some behind-the-scenes
got a weird question for you based on some weird happenings on our site.
Hi I write some code to hide and show some based on the selected
I want to invalidate sessions of users based on some Event. I store their

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.