0
lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.4 LTS
Release:    18.04
Codename:   bionic

***** Source ******

// This is a disposable program for expermentation
#include <stdio.h>
#include <time.h>

int i; char c; int main() { //float now = time(NULL); int now = time(NULL); for (i = 32; i < 66; ++i){ c = i ; printf("*********\n"); printf(" %d\n",i); printf(" %c\n", c); printf("^^^^^^^^^^\n"); //printf("Now: %f \n", now); printf("Now: %d \n", now); } / end for */ // The four lines below were added in hopes of creating a core dump. int foo = 1; int bar = 0; int result = foo/bar; printf("Result: %d", result); return (0); } // end main..

************* End source ********

Ran gcc from command line.

.../miscplayground$ gcc -g -o foobar play.c

Ran compiled code.

miscplayground$ ./foobar 

 32

^^^^^^^^^^ Now: 1605890415


33 ! ^^^^^^^^^^ Now: 1605890415

****** NOTE: The mid section of the output has cut for the purpose of eleminating data not relativant to the issue.. ******************** End NOTE *************************************

^^^^^^^^^^
Now: 1605890415 
**********
 64
 @
^^^^^^^^^^
Now: 1605890415 
**********
 65
 A
^^^^^^^^^^
Now: 1605890415 
Floating point exception (core dumped)
(base)

After running "sudo updatedb" then rebooting just to be sure the database was read, I ran

$ sudo locate -i coredump | grep -i foobar
[sudo] password for kindness: 
(base) kindness@kindness-Latitude-E6220:~/development/go/Go_pdf$

**** NOTE that no results returned. *******

steeldriver
  • 136,215
  • 21
  • 243
  • 336
  • Normally, the corefile would simply be named core, and would be produced in the current directory. What is the output of ulimit -c? – steeldriver Nov 20 '20 at 17:08
  • Does this help? https://askubuntu.com/questions/1123505/core-file-not-generated-in-ubuntu-18-04 – FedKad Nov 20 '20 at 18:45

0 Answers0