Re:Glibc getaddrinfo stack-based buffer overflow
by IgorPartola on Tuesday February 16, 2016 @11:37AM
(#11111021)
Nonetheless, it's something that is available to you as a developer. I am firmly in the "right tool for the job" camp, and I can see situations where C is the better tool. I don't see why mobile app development would benefit from it, but I almost never have the opportunity to work with Android.
I have never attempted to put together a full libc in ANSI C, no. My experience there is limited to putting together parts of it for various microcontrollers, where I was more or less bound to ANSI C and chose to use no assembly.
That's a long way of saying, what's your point? And why do you feel the need to get personal?
Re:Glibc getaddrinfo stack-based buffer overflow
by pjmlp on Tuesday February 16, 2016 @11:53AM
(#11111188)
Excuse me if it felt personal it wasn't my intention, just the way I write.
Non native speaker here.
As I mentioned in the reply and in another thread, I do use the NDK, but I wouldn't if there were better alternatives.
30 years ago those microcontrollers would probably be programmable in Assembly and Forth, Pascal, Basic and C dialects. At least when I think about Z80 like ones.
I also feel the pains that Android teams imposes on the NDK users to use it as little as possible.
If you bothered to read the contents of the link that you pushed.
"Notably, using native code on Android generally does not result in a noticable performance improvement, but it always increases your app complexity. In general, you should only use the NDK if it is essential to your app—never because you simply prefer to program in C/C++. When examining whether or not you should develop in native code, think about your requirements and see if the Android framework APIs provide the functionality that you need"
Also Android Java is nowadays AOT compiled to native code. So whatever C and C++ dependencies there are, could certainly eventually be replaced if there were willingness to do so.
Besides, have you ever tried to implement libc in ANSI C, without language extensions and a sprinkle of Assembly?