Glibc code added, will design test cases to debug.