Madayantī bore the child within the womb for seven years and did not give birth. Therefore Vasiṣṭha struck her abdomen with a stone, and then the child was born. Consequently, the child was known as Aśmaka [“the child born of a stone”].
Srimad Bhagavata Purana
श्रीमद्भागवतमहापुराणम्
मूल श्लोकः
सा वै सप्त समा गर्भमबिभ्रन्न व्यजायत । जघ्नेऽश्मनोदरं तस्याः सोऽश्मकस्तेन कथ्यते
sā vai sapta samā garbhamabibhranna vyajāyata | jaghne'śmanodaraṃ tasyāḥ so'śmakastena kathyate
SB 9.9.39